Skip to content

Commit 8073673

Browse files
committed
[net] remove CConnman::SetServices
It just forwards calls to CAddrMan::SetServices.
1 parent 392a95d commit 8073673

File tree

4 files changed

+1
-14
lines changed

4 files changed

+1
-14
lines changed

src/net.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,11 +2635,6 @@ CConnman::~CConnman()
26352635
Stop();
26362636
}
26372637

2638-
void CConnman::SetServices(const CService &addr, ServiceFlags nServices)
2639-
{
2640-
addrman.SetServices(addr, nServices);
2641-
}
2642-
26432638
void CConnman::MarkAddressGood(const CAddress& addr)
26442639
{
26452640
addrman.Good(addr);

src/net.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,6 @@ class CConnman
921921
};
922922

923923
// Addrman functions
924-
void SetServices(const CService &addr, ServiceFlags nServices);
925924
void MarkAddressGood(const CAddress& addr);
926925
bool AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty = 0);
927926
std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct);

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
23322332
nServices = ServiceFlags(nServiceInt);
23332333
if (!pfrom.IsInboundConn())
23342334
{
2335-
m_connman.SetServices(pfrom.addr, nServices);
2335+
m_addrman.SetServices(pfrom.addr, nServices);
23362336
}
23372337
if (pfrom.ExpectServicesFromConn() && !HasAllDesirableServiceFlags(nServices))
23382338
{

src/test/fuzz/connman.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
3030
CAddress random_address;
3131
CNetAddr random_netaddr;
3232
CNode random_node = ConsumeNode(fuzzed_data_provider);
33-
CService random_service;
3433
CSubNet random_subnet;
3534
std::string random_string;
3635
while (fuzzed_data_provider.ConsumeBool()) {
@@ -42,9 +41,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
4241
[&] {
4342
random_netaddr = ConsumeNetAddr(fuzzed_data_provider);
4443
},
45-
[&] {
46-
random_service = ConsumeService(fuzzed_data_provider);
47-
},
4844
[&] {
4945
random_subnet = ConsumeSubNet(fuzzed_data_provider);
5046
},
@@ -128,9 +124,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
128124
[&] {
129125
connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool());
130126
},
131-
[&] {
132-
connman.SetServices(random_service, ConsumeWeakEnum(fuzzed_data_provider, ALL_SERVICE_FLAGS));
133-
},
134127
[&] {
135128
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
136129
});

0 commit comments

Comments
 (0)