mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 08:44:02 +02:00
net: make V1Transport implicitly use current chainparams
The rest of net.cpp already uses Params() to determine chainparams in many places (and even V1Transport itself does so in some places). Since the only chainparams dependency is through the message start characters, just store those directly in the transport.
This commit is contained in:
@@ -25,8 +25,8 @@ void initialize_p2p_transport_serialization()
|
||||
FUZZ_TARGET(p2p_transport_serialization, .init = initialize_p2p_transport_serialization)
|
||||
{
|
||||
// Construct transports for both sides, with dummy NodeIds.
|
||||
V1Transport recv_transport{Params(), NodeId{0}, SER_NETWORK, INIT_PROTO_VERSION};
|
||||
V1Transport send_transport{Params(), NodeId{1}, SER_NETWORK, INIT_PROTO_VERSION};
|
||||
V1Transport recv_transport{NodeId{0}, SER_NETWORK, INIT_PROTO_VERSION};
|
||||
V1Transport send_transport{NodeId{1}, SER_NETWORK, INIT_PROTO_VERSION};
|
||||
|
||||
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user