Просмотр исходного кода

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

skoupidi 1 год назад
Родитель
Сommit
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
             }