mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-10 14:48:46 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user