diff options
author | John Newbery <john@johnnewbery.com> | 2020-10-23 10:19:25 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-03-20 10:24:40 +0000 |
commit | 8073673dbcb2744fcc9c011edf2d61388ca929cd (patch) | |
tree | 723a9968b6c664281c0c9e39c37c38bb1fcf0c8f /src | |
parent | 392a95d393a9af01b53e5e68197e81968efb84fc (diff) | |
download | bitcoin-8073673dbcb2744fcc9c011edf2d61388ca929cd.tar.xz |
[net] remove CConnman::SetServices
It just forwards calls to CAddrMan::SetServices.
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 5 | ||||
-rw-r--r-- | src/net.h | 1 | ||||
-rw-r--r-- | src/net_processing.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/connman.cpp | 7 |
4 files changed, 1 insertions, 14 deletions
diff --git a/src/net.cpp b/src/net.cpp index 68b2042155..27c64a737e 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2635,11 +2635,6 @@ CConnman::~CConnman() Stop(); } -void CConnman::SetServices(const CService &addr, ServiceFlags nServices) -{ - addrman.SetServices(addr, nServices); -} - void CConnman::MarkAddressGood(const CAddress& addr) { addrman.Good(addr); @@ -921,7 +921,6 @@ public: }; // Addrman functions - void SetServices(const CService &addr, ServiceFlags nServices); void MarkAddressGood(const CAddress& addr); bool AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty = 0); std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct); diff --git a/src/net_processing.cpp b/src/net_processing.cpp index fa24f061ef..6942f02a18 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2332,7 +2332,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type, nServices = ServiceFlags(nServiceInt); if (!pfrom.IsInboundConn()) { - m_connman.SetServices(pfrom.addr, nServices); + m_addrman.SetServices(pfrom.addr, nServices); } if (pfrom.ExpectServicesFromConn() && !HasAllDesirableServiceFlags(nServices)) { diff --git a/src/test/fuzz/connman.cpp b/src/test/fuzz/connman.cpp index 7bb5ed9657..4c4da24262 100644 --- a/src/test/fuzz/connman.cpp +++ b/src/test/fuzz/connman.cpp @@ -30,7 +30,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman) CAddress random_address; CNetAddr random_netaddr; CNode random_node = ConsumeNode(fuzzed_data_provider); - CService random_service; CSubNet random_subnet; std::string random_string; while (fuzzed_data_provider.ConsumeBool()) { @@ -43,9 +42,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman) random_netaddr = ConsumeNetAddr(fuzzed_data_provider); }, [&] { - random_service = ConsumeService(fuzzed_data_provider); - }, - [&] { random_subnet = ConsumeSubNet(fuzzed_data_provider); }, [&] { @@ -129,9 +125,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman) connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool()); }, [&] { - connman.SetServices(random_service, ConsumeWeakEnum(fuzzed_data_provider, ALL_SERVICE_FLAGS)); - }, - [&] { connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool()); }); } |