mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge 8b1de78577 into merged_master (Bitcoin PR bitcoin/bitcoin#23413)
This commit is contained in:
commit
72a90148c8
24 changed files with 125 additions and 124 deletions
|
|
@ -288,7 +288,7 @@ public:
|
|||
CScript scriptPubKey = script;
|
||||
if (wm == WitnessMode::PKH) {
|
||||
uint160 hash;
|
||||
CHash160().Write(MakeSpan(script).subspan(1)).Finalize(hash);
|
||||
CHash160().Write(Span{script}.subspan(1)).Finalize(hash);
|
||||
script = CScript() << OP_DUP << OP_HASH160 << ToByteVector(hash) << OP_EQUALVERIFY << OP_CHECKSIG;
|
||||
scriptPubKey = CScript() << witnessversion << ToByteVector(hash);
|
||||
} else if (wm == WitnessMode::SH) {
|
||||
|
|
@ -1823,7 +1823,7 @@ BOOST_AUTO_TEST_CASE(bip341_keypath_test_vectors)
|
|||
// BOOST_CHECK_EQUAL(HexStr(sighash), input["intermediary"]["sigHash"].get_str());
|
||||
|
||||
// To verify the sigmsg, hash the expected sigmsg, and compare it with the (expected) sighash.
|
||||
// BOOST_CHECK_EQUAL(HexStr((CHashWriter(HASHER_TAPSIGHASH_ELEMENTS) << MakeSpan(ParseHex(input["intermediary"]["sigMsg"].get_str()))).GetSHA256()), input["intermediary"]["sigHash"].get_str());
|
||||
//BOOST_CHECK_EQUAL(HexStr((CHashWriter(HASHER_TAPSIGHASH_ELEMENTS) << Span{ParseHex(input["intermediary"]["sigMsg"].get_str())}).GetSHA256()), input["intermediary"]["sigHash"].get_str());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue