mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-03 18:29:21 +02:00
Use ParamsWrapper for witness serialization
This commit is contained in:
@@ -24,7 +24,7 @@ static void DeserializeBlockTest(benchmark::Bench& bench)
|
||||
|
||||
bench.unit("block").run([&] {
|
||||
CBlock block;
|
||||
stream >> block;
|
||||
stream >> TX_WITH_WITNESS(block);
|
||||
bool rewound = stream.Rewind(benchmark::data::block413567.size());
|
||||
assert(rewound);
|
||||
});
|
||||
@@ -41,7 +41,7 @@ static void DeserializeAndCheckBlockTest(benchmark::Bench& bench)
|
||||
|
||||
bench.unit("block").run([&] {
|
||||
CBlock block; // Note that CBlock caches its checked state, so we need to recreate it here
|
||||
stream >> block;
|
||||
stream >> TX_WITH_WITNESS(block);
|
||||
bool rewound = stream.Rewind(benchmark::data::block413567.size());
|
||||
assert(rewound);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ struct TestBlockAndIndex {
|
||||
std::byte a{0};
|
||||
stream.write({&a, 1}); // Prevent compaction
|
||||
|
||||
stream >> block;
|
||||
stream >> TX_WITH_WITNESS(block);
|
||||
|
||||
blockHash = block.GetHash();
|
||||
blockindex.phashBlock = &blockHash;
|
||||
|
||||
@@ -62,7 +62,7 @@ static void VerifyScriptBench(benchmark::Bench& bench)
|
||||
|
||||
#if defined(HAVE_CONSENSUS_LIB)
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
stream << txSpend;
|
||||
stream << TX_WITH_WITNESS(txSpend);
|
||||
int csuccess = bitcoinconsensus_verify_script_with_amount(
|
||||
txCredit.vout[0].scriptPubKey.data(),
|
||||
txCredit.vout[0].scriptPubKey.size(),
|
||||
|
||||
Reference in New Issue
Block a user