Skip to content

Commit

Permalink
Make sure all output token ids are actually configured (#1876)
Browse files Browse the repository at this point in the history
Fixes #1868
  • Loading branch information
cbeck88 authored Apr 28, 2022
1 parent 764b32c commit aa68e53
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions consensus/enclave/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,15 @@ impl ConsensusEnclave for SgxConsensusEnclave {
let minimum_fee = ct_min_fee_map
.get(&fee_token_id)
.ok_or(TransactionValidationError::TokenNotYetConfigured)?;

// Make sure any extra token ids that appear in the outputs are also already
// configured. (this was github issue #1868)
for token_id in tx.signature.output_token_ids.iter() {
ct_min_fee_map
.get(&TokenId::from(token_id))
.ok_or(TransactionValidationError::TokenNotYetConfigured)?;
}

mc_transaction_core::validation::validate(
&tx,
block_index,
Expand Down

0 comments on commit aa68e53

Please sign in to comment.