validator/consensus: revert to overlay checkpoint when a transaction exceeds configured limit

This commit is contained in:
skoupidi
2025-05-20 16:00:06 +03:00
parent b89267bbc7
commit e5dd2dddb5

View File

@@ -879,7 +879,12 @@ impl Fork {
// Check gas limit - if accumulated gas used exceeds it, break out of loop
if accumulated_gas_usage > GAS_LIMIT_UNPROPOSED_TXS {
warn!(target: "validator::consensus::unproposed_txs", "Retrieving transaction {} would exceed configured unproposed transaction gas limit: {} - {}", tx, accumulated_gas_usage, GAS_LIMIT_UNPROPOSED_TXS);
warn!(
target: "validator::consensus::unproposed_txs",
"Retrieving transaction {} would exceed configured unproposed transaction gas limit: {} - {}",
tx, accumulated_gas_usage, GAS_LIMIT_UNPROPOSED_TXS,
);
overlay.lock().unwrap().revert_to_checkpoint()?;
break
}