From 90c07aa33905b98159471ca1bb06abf3480eb999 Mon Sep 17 00:00:00 2001 From: Uncle Stretch Date: Sun, 16 Feb 2025 13:55:03 +0300 Subject: [PATCH] decrement nonce on transaction error Signed-off-by: Uncle Stretch --- Cargo.toml | 2 +- src/network/predefined_txs.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index aa808ea..2f90cd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "ghost-eye" authors = ["str3tch "] description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost" -version = "0.3.24" +version = "0.3.25" edition = "2021" [dependencies] diff --git a/src/network/predefined_txs.rs b/src/network/predefined_txs.rs index cf856e4..9d1a884 100644 --- a/src/network/predefined_txs.rs +++ b/src/network/predefined_txs.rs @@ -261,6 +261,9 @@ async fn inner_sign_and_submit_then_watch( Ok(tx_progress) }, Err(err) => { + if let Some(ref mut nonce) = maybe_nonce { + **nonce = nonce.saturating_sub(1); + } action_tx.send(Action::EventLog( format!("error during {tx_name} transaction: {err}"), ActionLevel::Error,