aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-11-17 10:37:47 +0000
committerfanquake <fanquake@gmail.com>2023-11-17 10:56:41 +0000
commit950af7c8767aaaf66fe329cb10deaf0aea8e6ed9 (patch)
tree3287d25df47bb2e67816726a33cbd71e430b5330 /src/bench
parentafd3e99856208d83bccfeb7bfbb0462f665b28e1 (diff)
parent83986f464c59a6517f790a960a72574e167f3f72 (diff)
Merge bitcoin/bitcoin#28878: Remove version field from GetSerializeSize
83986f464c59a6517f790a960a72574e167f3f72 Include version.h in fewer places (Anthony Towns) c7b61fd61b199cbefda660c9d394bb4035a49528 Convert some CDataStream to DataStream (Anthony Towns) 1410d300df7e57a895f2697d9849a2201021c973 serialize: Drop useless version param from GetSerializeSize() (Anthony Towns) bf574a75016123309b894da895ab1c7a81731933 serialize: drop GetSerializeSizeMany (Anthony Towns) efa9eb6d7c8012fe4ed85699d81c8fe5dd18da1e serialize: 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: ACK 83986f464c59a6517f790a960a72574e167f3f72 📒 theuni: ACK 83986f464c59a6517f790a960a72574e167f3f72. Tree-SHA512: 36617b6dfbb1b4b0afbf673e905525fc6d623d3f568d3f86e3b9d4f69820db97d099e83a88007bfff881f731ddca6755ebf1549e8d8a7762437dfadbf434c62e
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/checkblock.cpp4
-rw-r--r--src/bench/verify_script.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bench/checkblock.cpp b/src/bench/checkblock.cpp
index 9f52a22672..b81878006c 100644
--- a/src/bench/checkblock.cpp
+++ b/src/bench/checkblock.cpp
@@ -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
diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp
index e1a0bf138e..3682b33518 100644
--- a/src/bench/verify_script.cpp
+++ b/src/bench/verify_script.cpp
@@ -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(),