Browse Source

bitcoin-tx: rbfoptin: Avoid touching nSequence if the value is already opting in

tags/v0.15.1
Luke Dashjr 4 years ago
parent
commit
23b0fe34f5
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/bitcoin-tx.cpp

+ 3
- 1
src/bitcoin-tx.cpp View File

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

Loading…
Cancel
Save