Skip to content

Commit ae5bcc7

Browse files
committed
Merge #10694: Remove redundant code in MutateTxSign(CMutableTransaction&, const std::string&)
b1149ee Remove redundant code in MutateTxSign(CMutableTransaction&, const std::string&) (practicalswift) Pull request description: Remove redundant code in `MutateTxSign(CMutableTransaction&, const std::string&)`. Tree-SHA512: 0f0aba4def18b9a4ca73f2bd676881bc05d852d1d34b564416b2b979056263e5471c5d8ce743af44ef6bce11d77b74d18151c983b735cdf47c36f6591ab4b3fb
2 parents 66e9142 + b1149ee commit ae5bcc7

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

@@ -637,7 +636,6 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
637636
CTxIn& txin = mergedTx.vin[i];
638637
const Coin& coin = view.AccessCoin(txin.prevout);
639638
if (coin.IsSpent()) {
640-
fComplete = false;
641639
continue;
642640
}
643641
const CScript& prevPubKey = coin.out.scriptPubKey;
@@ -652,14 +650,6 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
652650
for (const CTransaction& txv : txVariants)
653651
sigdata = CombineSignatures(prevPubKey, MutableTransactionSignatureChecker(&mergedTx, i, amount), sigdata, DataFromTransaction(txv, i));
654652
UpdateTransaction(mergedTx, i, sigdata);
655-
656-
if (!VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&mergedTx, i, amount)))
657-
fComplete = false;
658-
}
659-
660-
if (fComplete) {
661-
// do nothing... for now
662-
// perhaps store this for later optional JSON output
663653
}
664654

665655
tx = mergedTx;

0 commit comments

Comments
 (0)