fuel-core
fuel-core copied to clipboard
During block production should modify the block after passing all checks
Our code adds the transactions to the block first, and after, we could face an error that will skip the transaction. We need to go over the codebase and update all places to follow "Check first, update after" flow.
block.transactions.push(tx);
execution_data.tx_count = tx_count
.checked_add(1)
.ok_or(ExecutorError::TooManyTransactions)?;
The source is https://bugs.immunefi.com/dashboard/submission/32625.