Преглед изворни кода

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

skoupidi пре 1 година
родитељ
комит
e5dd2dddb5
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      src/validator/consensus.rs

+ 6 - 1
src/validator/consensus.rs

@@ -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
             }