fuel-core icon indicating copy to clipboard operation
fuel-core copied to clipboard

During block production should modify the block after passing all checks

Open xgreenx opened this issue 7 months ago • 0 comments

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.

xgreenx avatar Jul 05 '24 20:07 xgreenx