You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #10571: [RPC]Move transaction combining from signrawtransaction to new RPC
6b4f231 Move transaction combining from signrawtransaction to new RPC (Andrew Chow)
Pull request description:
Create a combinerawtransaction RPC which accepts a json array of hex raw transactions to combine them into one transaction. Signrawtransaction is changed to no longer combine transactions and only accept one transaction at a time.
The tests have been updated to test this. Tests for the signrawtransaction merge have also been removed.
This is part of #10570
Tree-SHA512: 035aebbd6537c1c017d5c8e06d309228b4c23fe52d5b31ffde19741c81a11a6346ddbbdc582b77b02a47f4c22b1952b69d3c2ee1109c29b3f0f1b612d8de53ed
// Only sign SIGHASH_SINGLE if there's a corresponding output:
798
-
if (!fHashSingle || (i < mergedTx.vout.size()))
799
-
ProduceSignature(MutableTransactionSignatureCreator(&keystore, &mergedTx, i, amount, nHashType), prevPubKey, sigdata);
868
+
if (!fHashSingle || (i < mtx.vout.size()))
869
+
ProduceSignature(MutableTransactionSignatureCreator(&keystore, &mtx, i, amount, nHashType), prevPubKey, sigdata);
870
+
sigdata = CombineSignatures(prevPubKey, TransactionSignatureChecker(&txConst, i, amount), sigdata, DataFromTransaction(mtx, i));
800
871
801
-
// ... and merge in other signatures:
802
-
for (const CMutableTransaction& txv : txVariants) {
803
-
if (txv.vin.size() > i) {
804
-
sigdata = CombineSignatures(prevPubKey, TransactionSignatureChecker(&txConst, i, amount), sigdata, DataFromTransaction(txv, i));
805
-
}
806
-
}
807
-
808
-
UpdateTransaction(mergedTx, i, sigdata);
872
+
UpdateTransaction(mtx, i, sigdata);
809
873
810
874
ScriptError serror = SCRIPT_ERR_OK;
811
875
if (!VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, TransactionSignatureChecker(&txConst, i, amount), &serror)) {
0 commit comments