decrement nonce on transaction error

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-02-16 13:55:03 +03:00
parent c7cdafe3b6
commit 90c07aa339
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@
name = "ghost-eye" name = "ghost-eye"
authors = ["str3tch <stretch@ghostchain.io>"] authors = ["str3tch <stretch@ghostchain.io>"]
description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost" 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" edition = "2021"
[dependencies] [dependencies]

View File

@ -261,6 +261,9 @@ async fn inner_sign_and_submit_then_watch(
Ok(tx_progress) Ok(tx_progress)
}, },
Err(err) => { Err(err) => {
if let Some(ref mut nonce) = maybe_nonce {
**nonce = nonce.saturating_sub(1);
}
action_tx.send(Action::EventLog( action_tx.send(Action::EventLog(
format!("error during {tx_name} transaction: {err}"), format!("error during {tx_name} transaction: {err}"),
ActionLevel::Error, ActionLevel::Error,