diff options
| author | Luke Dashjr <[email protected]> | 2017-02-03 19:14:02 +0000 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2017-06-05 23:14:34 +0000 |
| commit | 23b0fe34f526693985099d9160806d00d48a9ecd (patch) | |
| tree | 6154d0b0291e512090a3edc647ebc0072469353a /src | |
| parent | Introduce MAX_BIP125_RBF_SEQUENCE constant (diff) | |
| download | discoin-23b0fe34f526693985099d9160806d00d48a9ecd.tar.xz discoin-23b0fe34f526693985099d9160806d00d48a9ecd.zip | |
bitcoin-tx: rbfoptin: Avoid touching nSequence if the value is already opting in
Diffstat (limited to 'src')
| -rw-r--r-- | src/bitcoin-tx.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index a67c42ec5..367801dd7 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -216,7 +216,9 @@ static void MutateTxRBFOptIn(CMutableTransaction& tx, const std::string& strInId int cnt = 0; for (CTxIn& txin : tx.vin) { if (strInIdx == "" || cnt == inIdx) { - txin.nSequence = MAX_BIP125_RBF_SEQUENCE; + if (txin.nSequence > MAX_BIP125_RBF_SEQUENCE) { + txin.nSequence = MAX_BIP125_RBF_SEQUENCE; + } } ++cnt; } |