From c27c30561d4a47fda29a6ae71f576f77663ccdca Mon Sep 17 00:00:00 2001 From: emma31-dev Date: Mon, 7 Sep 2026 14:49:36 +0100 Subject: [PATCH 1/4] Persist wallet changes with error on failure Return an error when wallet persistence fails instead of silently succeeding when no changes were written. --- src/utils/runtime.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/runtime.rs b/src/utils/runtime.rs index 8beb5527..7f792a87 100644 --- a/src/utils/runtime.rs +++ b/src/utils/runtime.rs @@ -58,8 +58,11 @@ impl RuntimeWallet { Self::Standard(_) => Ok(()), #[cfg(any(feature = "sqlite", feature = "redb"))] Self::Persisted(wallet, persister) => { - wallet.persist(persister)?; - Ok(()) + if wallet.persist(persister)? { + Ok(()) + } else { + Err(Error::Generic("Wallet changes were not persisted".to_string())) + } } } } From c294b0c0e9f6942d3668ad18ba91f683d43d3f60 Mon Sep 17 00:00:00 2001 From: emma31-dev Date: Mon, 7 Sep 2026 14:51:07 +0100 Subject: [PATCH 2/4] Reformat persisted wallet error message --- src/utils/runtime.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/runtime.rs b/src/utils/runtime.rs index 7f792a87..40ba1418 100644 --- a/src/utils/runtime.rs +++ b/src/utils/runtime.rs @@ -61,7 +61,9 @@ impl RuntimeWallet { if wallet.persist(persister)? { Ok(()) } else { - Err(Error::Generic("Wallet changes were not persisted".to_string())) + Err(Error::Generic( + "Wallet changes were not persisted".to_string(), + )) } } } From 8cc7f454f9cfaa4a055276ae8ad1da5e3e53fd5d Mon Sep 17 00:00:00 2001 From: Vadim Anufriev Date: Tue, 18 Aug 2026 12:34:35 +0400 Subject: [PATCH 3/4] chore: remove unused tap dependency --- Cargo.lock | 7 ------- Cargo.toml | 1 - 2 files changed, 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17bbc65e..b88b288f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -269,7 +269,6 @@ dependencies = [ "serde", "serde_json", "shlex 1.3.0", - "tap", "tempfile", "thiserror 2.0.18", "tokio", @@ -3345,12 +3344,6 @@ dependencies = [ "syn", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tar" version = "0.4.46" diff --git a/Cargo.toml b/Cargo.toml index b6e2c2d4..adc1d9c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,6 @@ tracing = "0.1.44" tracing-subscriber = "0.3.20" toml = "1.1.0" serde= {version = "1.0", features = ["derive"]} -tap = "1.0.1" # Optional dependencies bdk_bitcoind_rpc = { version = "0.22.0", features = ["std"], optional = true } From 49a2afdbd5cc44e2d22a02b2c79d2c76e299fabd Mon Sep 17 00:00:00 2001 From: emma31-dev Date: Mon, 7 Sep 2026 15:06:38 +0100 Subject: [PATCH 4/4] Simplify wallet persistence error message Signed-off-by: emma31-dev --- src/utils/runtime.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/runtime.rs b/src/utils/runtime.rs index 40ba1418..edbe736d 100644 --- a/src/utils/runtime.rs +++ b/src/utils/runtime.rs @@ -61,9 +61,7 @@ impl RuntimeWallet { if wallet.persist(persister)? { Ok(()) } else { - Err(Error::Generic( - "Wallet changes were not persisted".to_string(), - )) + Err(Error::Generic("Wallet changes were not persisted".into())) } } }