Skip to content

Commit

Permalink
Collect native_token_ids into a HashSet
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Oct 27, 2023
1 parent b007068 commit 83b9752
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sdk/src/types/block/semantic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,8 @@ impl<'a> SemanticValidationContext<'a> {
return Ok(Some(TransactionFailureReason::SemanticValidationFailed));
}

let mut native_token_ids = HashSet::new();

// Validation of input native tokens.
for (token_id, _input_amount) in self.input_native_tokens.iter() {
native_token_ids.insert(token_id);
}
let mut native_token_ids = self.input_native_tokens.keys().collect::<HashSet<_>>();

// Validation of output native tokens.
for (token_id, output_amount) in self.output_native_tokens.iter() {
Expand Down

0 comments on commit 83b9752

Please sign in to comment.