mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
fuzz: Check for addrv1 compatibility before using addrv1 serializer on CService
This commit is contained in:
parent
ca18860563
commit
c2cf8a18c2
1 changed files with 4 additions and 1 deletions
|
@ -191,7 +191,10 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||
#elif SERVICE_DESERIALIZE
|
||||
CService s;
|
||||
DeserializeFromFuzzingInput(buffer, s);
|
||||
AssertEqualAfterSerializeDeserialize(s);
|
||||
if (s.IsAddrV1Compatible()) {
|
||||
AssertEqualAfterSerializeDeserialize(s);
|
||||
}
|
||||
AssertEqualAfterSerializeDeserialize(s, INIT_PROTO_VERSION | ADDRV2_FORMAT);
|
||||
#elif MESSAGEHEADER_DESERIALIZE
|
||||
CMessageHeader mh;
|
||||
DeserializeFromFuzzingInput(buffer, mh);
|
||||
|
|
Loading…
Add table
Reference in a new issue