diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2017-02-03 19:13:28 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2017-06-05 23:14:34 +0000 |
commit | b005bf21a7cabe827ef62f266c22adf2ee745b61 (patch) | |
tree | b5c1181a3e3300eeaf458c0b588510700bf50e69 /src/wallet | |
parent | 575cde4605c9a321ad591dbb7d632dd0ef946d40 (diff) |
Introduce MAX_BIP125_RBF_SEQUENCE constant
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index c00f52282f..b2706d09f6 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2685,9 +2685,10 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT // and in the spirit of "smallest possible change from prior // behavior." bool rbf = coinControl ? coinControl->signalRbf : fWalletRbf; + const uint32_t nSequence = rbf ? MAX_BIP125_RBF_SEQUENCE : (std::numeric_limits<unsigned int>::max() - 1); for (const auto& coin : setCoins) txNew.vin.push_back(CTxIn(coin.outpoint,CScript(), - std::numeric_limits<unsigned int>::max() - (rbf ? 2 : 1))); + nSequence)); // Fill in dummy signatures for fee calculation. if (!DummySignTx(txNew, setCoins)) { |