Skip to content

Commit

Permalink
Use correct index of tx in block
Browse files Browse the repository at this point in the history
  • Loading branch information
coderofstuff committed Sep 7, 2024
1 parent c502278 commit 9b99059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consensus/src/consensus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ impl ConsensusApi for Consensus {
};
let (index, containing_acceptance) = match acceptance_data.iter().find_map(|mbad| {
let tx_arr_index =
mbad.accepted_transactions.iter().enumerate().find_map(|(index, tx)| (tx.transaction_id == txid).then_some(index));
mbad.accepted_transactions.iter().find_map(|tx| (tx.transaction_id == txid).then_some(tx.index_within_block as usize));
tx_arr_index.map(|index| (index, mbad.clone()))
}) {
Some((index, containing_acceptance)) => (index, containing_acceptance),
Expand Down

0 comments on commit 9b99059

Please sign in to comment.