From 8877eec726d82ba997191fb04b824c7684e16746 Mon Sep 17 00:00:00 2001 From: rkrux Date: Thu, 28 May 2026 19:35:54 +0530 Subject: [PATCH] wallet: allow anti-fee-sniping in sendall RPC while not relying on RBF default In case locktime (and replaceable) not being specified in this RPC request, the wallet sets the transaction replaceable due to the default value of opt-in RBF set in the wallet. This allowed the anti-fee-sniping flow to be executed but in case of replaceable being set false in the request, anti-fee-sniping flow would be missed. This patch fixes it. --- src/wallet/rpc/spend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp index b6cdc8600f3..8bb14c47948 100644 --- a/src/wallet/rpc/spend.cpp +++ b/src/wallet/rpc/spend.cpp @@ -1498,7 +1498,7 @@ RPCMethod sendall() if (output.depth == 0 && coin_control.m_version == TRUC_VERSION) { coin_control.m_max_tx_weight = TRUC_CHILD_MAX_WEIGHT; } - CTxIn input(output.outpoint.hash, output.outpoint.n, CScript(), rbf ? MAX_BIP125_RBF_SEQUENCE : CTxIn::SEQUENCE_FINAL); + CTxIn input(output.outpoint.hash, output.outpoint.n, CScript(), rbf ? MAX_BIP125_RBF_SEQUENCE : CTxIn::MAX_SEQUENCE_NONFINAL); rawTx.vin.push_back(input); total_input_value += output.txout.nValue; }