Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Bug Fixes

- `bump_fee_by_rbf` now only replaces transactions this wallet built and broadcast itself, and returns `TransactionNotBroadcastByWallet` for any other txid.
- Reconnect the shared Electrum connection after the server drops it, so wallet sync, fee updates and broadcasts recover without a node restart (for example after a mobile app returns from the background), and retry a failed broadcast once on the new connection, all within each call's original deadline.
- Fixed on-chain HTLC claims, anchor fee bumps and splices failing to sign when the transaction also spends inputs the on-chain wallet does not own.
- Fixed splicing from a Taproot primary wallet.
Expand Down
1 change: 1 addition & 0 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ enum NodeError {
"AsyncPaymentServicesDisabled",
"CannotRbfFundingTransaction",
"TransactionNotFound",
"TransactionNotBroadcastByWallet",
"TransactionAlreadyConfirmed",
"NoSpendableOutputs",
"CoinSelectionFailed",
Expand Down
8 changes: 8 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ pub enum Error {
CannotRbfFundingTransaction,
/// The transaction was not found in the wallet.
TransactionNotFound,
/// The wallet has no broadcast record for the transaction, so it cannot be fee-bumped.
TransactionNotBroadcastByWallet,
/// The transaction is already confirmed and cannot be modified.
TransactionAlreadyConfirmed,
/// The transaction has no spendable outputs.
Expand Down Expand Up @@ -239,6 +241,12 @@ impl fmt::Display for Error {
write!(f, "Cannot RBF a channel funding transaction.")
},
Self::TransactionNotFound => write!(f, "The transaction was not found in the wallet."),
Self::TransactionNotBroadcastByWallet => {
write!(
f,
"The wallet has no broadcast record for this transaction, so it cannot be fee-bumped."
)
},
Self::TransactionAlreadyConfirmed => {
write!(f, "The transaction is already confirmed and cannot be modified.")
},
Expand Down
5 changes: 5 additions & 0 deletions src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ pub(crate) const BDK_WALLET_INDEXER_PRIMARY_NAMESPACE: &str = "bdk_wallet";
pub(crate) const BDK_WALLET_INDEXER_SECONDARY_NAMESPACE: &str = "";
pub(crate) const BDK_WALLET_INDEXER_KEY: &str = "indexer";

/// The txid of each transaction the on-chain wallet built and broadcast is persisted as a key
/// (with an empty value) under this namespace.
pub(crate) const WALLET_BROADCAST_TXIDS_PRIMARY_NAMESPACE: &str = "wallet_broadcast_txids";
pub(crate) const WALLET_BROADCAST_TXIDS_SECONDARY_NAMESPACE: &str = "";

/// [`StaticInvoice`]s will be persisted under this key.
///
/// [`StaticInvoice`]: lightning::offers::static_invoice::StaticInvoice
Expand Down
Loading