mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
p2p, rpc, fuzz: various tiny follow-ups
This commit is contained in:
parent
e033ca1379
commit
c274574458
3 changed files with 5 additions and 5 deletions
|
@ -594,7 +594,7 @@ static std::string IPv6ToString(Span<const uint8_t> a, uint32_t scope_id)
|
|||
return r;
|
||||
}
|
||||
|
||||
static std::string OnionToString(const Span<const uint8_t>& addr)
|
||||
static std::string OnionToString(Span<const uint8_t> addr)
|
||||
{
|
||||
uint8_t checksum[torv3::CHECKSUM_LEN];
|
||||
torv3::Checksum(addr, checksum);
|
||||
|
|
|
@ -939,7 +939,7 @@ static RPCHelpMan addpeeraddress()
|
|||
bool success{false};
|
||||
|
||||
if (LookupHost(addr_string, net_addr, false)) {
|
||||
CAddress address{CAddress({net_addr, port}, ServiceFlags(NODE_NETWORK | NODE_WITNESS))};
|
||||
CAddress address{{net_addr, port}, ServiceFlags{NODE_NETWORK | NODE_WITNESS}};
|
||||
address.nTime = GetAdjustedTime();
|
||||
// The source address is set equal to the address. This is equivalent to the peer
|
||||
// announcing itself.
|
||||
|
|
|
@ -143,7 +143,7 @@ FUZZ_TARGET_DESERIALIZE(script_deserialize, {
|
|||
CScript script;
|
||||
DeserializeFromFuzzingInput(buffer, script);
|
||||
})
|
||||
FUZZ_TARGET_DESERIALIZE(subnet_deserialize, {
|
||||
FUZZ_TARGET_DESERIALIZE(sub_net_deserialize, {
|
||||
CSubNet sub_net_1;
|
||||
DeserializeFromFuzzingInput(buffer, sub_net_1, INIT_PROTO_VERSION);
|
||||
AssertEqualAfterSerializeDeserialize(sub_net_1, INIT_PROTO_VERSION);
|
||||
|
@ -223,7 +223,7 @@ FUZZ_TARGET_DESERIALIZE(coins_deserialize, {
|
|||
Coin coin;
|
||||
DeserializeFromFuzzingInput(buffer, coin);
|
||||
})
|
||||
FUZZ_TARGET_DESERIALIZE(net_address_deserialize, {
|
||||
FUZZ_TARGET_DESERIALIZE(netaddr_deserialize, {
|
||||
CNetAddr na;
|
||||
DeserializeFromFuzzingInput(buffer, na);
|
||||
if (na.IsAddrV1Compatible()) {
|
||||
|
@ -231,7 +231,7 @@ FUZZ_TARGET_DESERIALIZE(net_address_deserialize, {
|
|||
}
|
||||
AssertEqualAfterSerializeDeserialize(na, INIT_PROTO_VERSION | ADDRV2_FORMAT);
|
||||
})
|
||||
FUZZ_TARGET_DESERIALIZE(net_service_deserialize, {
|
||||
FUZZ_TARGET_DESERIALIZE(service_deserialize, {
|
||||
CService s;
|
||||
DeserializeFromFuzzingInput(buffer, s);
|
||||
if (s.IsAddrV1Compatible()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue