diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2023-11-30 11:03:18 -0500 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2023-11-30 11:11:51 -0500 |
commit | ffb021612b8f581cbbaffacc80922d1bc5683706 (patch) | |
tree | 279b796a909357b685576857726cc1b8f27acb9b /src/test/fuzz/script_sign.cpp | |
parent | cdb772313c037fd71c7dff6f0801a4de93cf0d26 (diff) | |
parent | fa98a097a30bc39f2424c0efd28a7979155faae6 (diff) |
Merge bitcoin/bitcoin#28451: refactor: Remove unused SER_DISK, SER_NETWORK, CDataStream
fa98a097a30bc39f2424c0efd28a7979155faae6 Rename version.h to node/protocol_version.h (MarcoFalke)
fa4fbd58169a244c14017c62218e443b18a868ef Remove unused version.h include (MarcoFalke)
fa0ae22ff2c608c94b26c85040c4a1c7e9f7cf90 Remove unused SER_NETWORK, SER_DISK (MarcoFalke)
fae00fe9c25af80024adda33d9077962964269ea Remove unused CDataStream (MarcoFalke)
fa7eb4f5c3d2438f9689cd46b22dcfd50f6bd751 fuzz: Drop unused version from fuzz input format (MarcoFalke)
Pull request description:
Seems odd to have code that is completely dead.
Fix this by removing all of it.
ACKs for top commit:
sipa:
utACK fa98a097a30bc39f2424c0efd28a7979155faae6
ajtowns:
ACK fa98a097a30bc39f2424c0efd28a7979155faae6
ryanofsky:
Seems odd to not code review ACK fa98a097a30bc39f2424c0efd28a7979155faae6 (looks good)
Tree-SHA512: 9f1b9d9f92bda0512610bda6653e892756f637860362a9abfa439faab62de233cbad94b7df78ebacc160d9667aadfed4d9df08c0edefa618c040a049050fb913
Diffstat (limited to 'src/test/fuzz/script_sign.cpp')
-rw-r--r-- | src/test/fuzz/script_sign.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/fuzz/script_sign.cpp b/src/test/fuzz/script_sign.cpp index 9c2966e0cb..9ae150e553 100644 --- a/src/test/fuzz/script_sign.cpp +++ b/src/test/fuzz/script_sign.cpp @@ -36,14 +36,13 @@ FUZZ_TARGET(script_sign, .init = initialize_script_sign) const std::vector<uint8_t> key = ConsumeRandomLengthByteVector(fuzzed_data_provider, 128); { - DataStream stream{ConsumeDataStream(fuzzed_data_provider)}; - CDataStream random_data_stream{stream, SER_NETWORK, INIT_PROTO_VERSION}; // temporary copy, to be removed along with the version flag SERIALIZE_TRANSACTION_NO_WITNESS + DataStream random_data_stream{ConsumeDataStream(fuzzed_data_provider)}; std::map<CPubKey, KeyOriginInfo> hd_keypaths; try { DeserializeHDKeypaths(random_data_stream, key, hd_keypaths); } catch (const std::ios_base::failure&) { } - CDataStream serialized{SER_NETWORK, PROTOCOL_VERSION}; + DataStream serialized{}; SerializeHDKeypaths(serialized, hd_keypaths, CompactSizeWriter(fuzzed_data_provider.ConsumeIntegral<uint8_t>())); } @@ -60,7 +59,7 @@ FUZZ_TARGET(script_sign, .init = initialize_script_sign) } hd_keypaths[*pub_key] = *key_origin_info; } - CDataStream serialized{SER_NETWORK, PROTOCOL_VERSION}; + DataStream serialized{}; try { SerializeHDKeypaths(serialized, hd_keypaths, CompactSizeWriter(fuzzed_data_provider.ConsumeIntegral<uint8_t>())); } catch (const std::ios_base::failure&) { |