aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-06-07 13:03:13 +0800
committerfanquake <fanquake@gmail.com>2021-06-07 13:03:53 +0800
commit1cc123f40522978992248ac999fd91384084c5d3 (patch)
tree2bcb4110f37b17312141e7c7fe5409b00032504c
parente033ca13794699cf4744e71647db75c583a9a600 (diff)
parentc274574458e5921be4d1f3e86e6bba72a7cd3e65 (diff)
downloadbitcoin-1cc123f40522978992248ac999fd91384084c5d3.tar.xz
Merge bitcoin/bitcoin#22169: p2p, rpc, fuzz: various tiny follow-ups
c274574458e5921be4d1f3e86e6bba72a7cd3e65 p2p, rpc, fuzz: various tiny follow-ups (Jon Atack) Pull request description: - p2p: pass `Span` by value per https://github.com/bitcoin/bitcoin/pull/22143#issuecomment-853953438 as a follow-up to 8be56f0f8ecc54744 - rpc: remove duplicate `CAddress` constructor per https://github.com/bitcoin/bitcoin/pull/22043#discussion_r638535703 - fuzz: rename 3 fuzz targets changed in eba9a94b9f56be2fda623e77f19b960425ea1eb5 back to their original names per https://github.com/bitcoin-core/qa-assets/pull/63#issuecomment-855281865 ACKs for top commit: MarcoFalke: cr ACK c274574458e5921be4d1f3e86e6bba72a7cd3e65 practicalswift: cr ACK c274574458e5921be4d1f3e86e6bba72a7cd3e65: patch looks correct jarolrod: ACK c274574458e5921be4d1f3e86e6bba72a7cd3e65 Tree-SHA512: 3672b210d30b3a91f3a6455005e4d3cb1f89621820c417c645d24b06e53459440122a1f75758e0e04c3d04eff9d6f88ef62865216aa3e42301c6df783f7c0b4a
-rw-r--r--src/netaddress.cpp2
-rw-r--r--src/rpc/net.cpp2
-rw-r--r--src/test/fuzz/deserialize.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp
index 0ae8dd0698..1ea3969978 100644
--- a/src/netaddress.cpp
+++ b/src/netaddress.cpp
@@ -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);
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index c4d6e3d546..3013c76825 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -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.
diff --git a/src/test/fuzz/deserialize.cpp b/src/test/fuzz/deserialize.cpp
index 700e368319..1290c78712 100644
--- a/src/test/fuzz/deserialize.cpp
+++ b/src/test/fuzz/deserialize.cpp
@@ -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()) {