Skip to content

Commit b1149ee

Browse files
Remove redundant code in MutateTxSign(CMutableTransaction&, const std::string&)
1 parent 9cf6393 commit b1149ee

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/bitcoin-tx.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,6 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
551551
// mergedTx will end up with all the signatures; it
552552
// starts as a clone of the raw tx:
553553
CMutableTransaction mergedTx(txVariants[0]);
554-
bool fComplete = true;
555554
CCoinsView viewDummy;
556555
CCoinsViewCache view(&viewDummy);
557556

@@ -639,7 +638,6 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
639638
CTxIn& txin = mergedTx.vin[i];
640639
const Coin& coin = view.AccessCoin(txin.prevout);
641640
if (coin.IsSpent()) {
642-
fComplete = false;
643641
continue;
644642
}
645643
const CScript& prevPubKey = coin.out.scriptPubKey;
@@ -654,14 +652,6 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
654652
for (const CTransaction& txv : txVariants)
655653
sigdata = CombineSignatures(prevPubKey, MutableTransactionSignatureChecker(&mergedTx, i, amount), sigdata, DataFromTransaction(txv, i));
656654
UpdateTransaction(mergedTx, i, sigdata);
657-
658-
if (!VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&mergedTx, i, amount)))
659-
fComplete = false;
660-
}
661-
662-
if (fComplete) {
663-
// do nothing... for now
664-
// perhaps store this for later optional JSON output
665655
}
666656

667657
tx = mergedTx;

0 commit comments

Comments
 (0)