aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-08-23 11:41:06 +0800
committerfanquake <fanquake@gmail.com>2021-08-23 12:25:49 +0800
commite826b22da252e0599c61d21c98ff89f366b3120f (patch)
treec516efed70b501391148caf8b77e570084a704d9 /src/test
parenta93e7a442250d3522261d6e04d5660c5fecd2d8a (diff)
parent08f57a0057c58f19cd8ae3de89548d014980478a (diff)
downloadbitcoin-e826b22da252e0599c61d21c98ff89f366b3120f.tar.xz
Merge bitcoin/bitcoin#22275: A few follow-ups for taproot signing
08f57a0057c58f19cd8ae3de89548d014980478a Assert that IsComplete() in GetSpendData() (Pieter Wuille) d8f4b976d5ae9e6eee741dfdda53b8bc8573221b Remove default nHashTypeIn arguments to MutableTransactionSignatureCreator (Pieter Wuille) c7048aae9545afd8d522e200ecadcf69f22399a0 Simplify SignTransaction precomputation loop (Pieter Wuille) addb9b5a71ff96bdb1a4c15bc9345de0d7f2c98c Improve comments in taproot signing logic (Pieter Wuille) Pull request description: This addresses a few review comments from #21365 that were left at the time of merge (as well as some from #22166 applying to the commit it shared with #21365). I do not think any are blockers for a 22.0 release. ACKs for top commit: theStack: re-ACK 08f57a0057c58f19cd8ae3de89548d014980478a 🌴 Zero-1729: crACK 08f57a0 jonatack: Code review ACK 08f57a0057c58f19cd8ae3de89548d014980478a per `git range-diff e9d6eb1 9336670 08f57a0` followed by re-code review per commit to swap context back into memory and debug build/run unit tests + feature_taproot.py as a sanity check Tree-SHA512: 968750109ba8d6faf3016035a38f81c6aefb724c632a3cab0bbf43cf31b9d187b6b0fddd8772768f57338df11eb07ab9c4c6dacdf3cf35b71f29699c67a301ea
Diffstat (limited to 'src/test')
-rw-r--r--src/test/script_tests.cpp2
-rw-r--r--src/test/transaction_tests.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 56e2aa63b9..2c39cbffb9 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -1160,7 +1160,7 @@ SignatureData CombineSignatures(const CTxOut& txout, const CMutableTransaction&
SignatureData data;
data.MergeSignatureData(scriptSig1);
data.MergeSignatureData(scriptSig2);
- ProduceSignature(DUMMY_SIGNING_PROVIDER, MutableTransactionSignatureCreator(&tx, 0, txout.nValue), txout.scriptPubKey, data);
+ ProduceSignature(DUMMY_SIGNING_PROVIDER, MutableTransactionSignatureCreator(&tx, 0, txout.nValue, SIGHASH_DEFAULT), txout.scriptPubKey, data);
return data;
}
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 571f792a53..97fd0600fa 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -561,7 +561,7 @@ SignatureData CombineSignatures(const CMutableTransaction& input1, const CMutabl
SignatureData sigdata;
sigdata = DataFromTransaction(input1, 0, tx->vout[0]);
sigdata.MergeSignatureData(DataFromTransaction(input2, 0, tx->vout[0]));
- ProduceSignature(DUMMY_SIGNING_PROVIDER, MutableTransactionSignatureCreator(&input1, 0, tx->vout[0].nValue), tx->vout[0].scriptPubKey, sigdata);
+ ProduceSignature(DUMMY_SIGNING_PROVIDER, MutableTransactionSignatureCreator(&input1, 0, tx->vout[0].nValue, SIGHASH_ALL), tx->vout[0].scriptPubKey, sigdata);
return sigdata;
}