mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 17:24:58 +02:00
Merge bitcoin/bitcoin#28878: Remove version field from GetSerializeSize
83986f464cInclude version.h in fewer places (Anthony Towns)c7b61fd61bConvert some CDataStream to DataStream (Anthony Towns)1410d300dfserialize: Drop useless version param from GetSerializeSize() (Anthony Towns)bf574a7501serialize: drop GetSerializeSizeMany (Anthony Towns)efa9eb6d7cserialize: Drop nVersion from [C]SizeComputer (Anthony Towns) Pull request description: Drops the version field from `GetSerializeSize()`, simplifying the code in various places. Also drop `GetSerializeSizeMany()` (as just removing the version parameter could result in silent bugs) and remove unnecessary instances of `#include <version.h>`. ACKs for top commit: maflcko: ACK83986f464c📒 theuni: ACK83986f464c. Tree-SHA512: 36617b6dfbb1b4b0afbf673e905525fc6d623d3f568d3f86e3b9d4f69820db97d099e83a88007bfff881f731ddca6755ebf1549e8d8a7762437dfadbf434c62e
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
static void DeserializeBlockTest(benchmark::Bench& bench)
|
||||
{
|
||||
CDataStream stream(benchmark::data::block413567, SER_NETWORK, PROTOCOL_VERSION);
|
||||
DataStream stream(benchmark::data::block413567);
|
||||
std::byte a{0};
|
||||
stream.write({&a, 1}); // Prevent compaction
|
||||
|
||||
@@ -32,7 +32,7 @@ static void DeserializeBlockTest(benchmark::Bench& bench)
|
||||
|
||||
static void DeserializeAndCheckBlockTest(benchmark::Bench& bench)
|
||||
{
|
||||
CDataStream stream(benchmark::data::block413567, SER_NETWORK, PROTOCOL_VERSION);
|
||||
DataStream stream(benchmark::data::block413567);
|
||||
std::byte a{0};
|
||||
stream.write({&a, 1}); // Prevent compaction
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ static void VerifyScriptBench(benchmark::Bench& bench)
|
||||
assert(success);
|
||||
|
||||
#if defined(HAVE_CONSENSUS_LIB)
|
||||
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
|
||||
DataStream stream;
|
||||
stream << TX_WITH_WITNESS(txSpend);
|
||||
int csuccess = bitcoinconsensus_verify_script_with_amount(
|
||||
txCredit.vout[0].scriptPubKey.data(),
|
||||
|
||||
Reference in New Issue
Block a user