diff --git a/sdk/src/client/api/block_builder/input_selection/mod.rs b/sdk/src/client/api/block_builder/input_selection/mod.rs index acb7f3b911..54b9c6be40 100644 --- a/sdk/src/client/api/block_builder/input_selection/mod.rs +++ b/sdk/src/client/api/block_builder/input_selection/mod.rs @@ -374,12 +374,12 @@ impl InputSelection { /// Selects inputs that meet the requirements of the outputs to satisfy the semantic validation of the overall /// transaction. Also creates a remainder output and chain transition outputs if required. pub fn select(mut self) -> Result { - // if !OUTPUT_COUNT_RANGE.contains(&(self.outputs.len() as u16)) { - // // If burn is provided, outputs will be added later - // if !(self.outputs.is_empty() && self.burn.is_some()) { - // return Err(Error::InvalidOutputCount(self.outputs.len())); - // } - // } + if !OUTPUT_COUNT_RANGE.contains(&(self.outputs.len() as u16)) { + // If burn or mana allotments are provided, outputs will be added later. + if !(self.outputs.is_empty() && (self.burn.is_some() || self.mana_allotments != 0)) { + return Err(Error::InvalidOutputCount(self.outputs.len())); + } + } self.filter_inputs();