Skip to content

Commit

Permalink
Add mana_allotments to ISA output count check
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Jan 9, 2024
1 parent 42a6101 commit fec2727
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sdk/src/client/api/block_builder/input_selection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Selected, Error> {
// 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();

Expand Down

0 comments on commit fec2727

Please sign in to comment.