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.
This commit is contained in:
rkrux
2026-05-28 19:35:54 +05:30
parent 13b7fffc5e
commit 8877eec726

View File

@@ -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;
}