Skip to content

Commit bcd7f30

Browse files
committed
[net] remove CConnman::MarkAddressGood
It just forwards calls to CAddrMan::Good.
1 parent 8073673 commit bcd7f30

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::MarkAddressGood(const CAddress& addr)
2639-
{
2640-
addrman.Good(addr);
2641-
}
2642-
26432638
bool CConnman::AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty)
26442639
{
26452640
return addrman.Add(vAddr, addrFrom, nTimePenalty);

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 MarkAddressGood(const CAddress& addr);
925924
bool AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty = 0);
926925
std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct);
927926
/**

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
24762476
//
24772477
// This moves an address from New to Tried table in Addrman,
24782478
// resolves tried-table collisions, etc.
2479-
m_connman.MarkAddressGood(pfrom.addr);
2479+
m_addrman.Good(pfrom.addr);
24802480
}
24812481

24822482
std::string remoteAddr;

src/test/fuzz/connman.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,13 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
2727
SetMockTime(ConsumeTime(fuzzed_data_provider));
2828
CAddrMan addrman;
2929
CConnman connman{fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>(), addrman, fuzzed_data_provider.ConsumeBool()};
30-
CAddress random_address;
3130
CNetAddr random_netaddr;
3231
CNode random_node = ConsumeNode(fuzzed_data_provider);
3332
CSubNet random_subnet;
3433
std::string random_string;
3534
while (fuzzed_data_provider.ConsumeBool()) {
3635
CallOneOf(
3736
fuzzed_data_provider,
38-
[&] {
39-
random_address = ConsumeAddress(fuzzed_data_provider);
40-
},
4137
[&] {
4238
random_netaddr = ConsumeNetAddr(fuzzed_data_provider);
4339
},
@@ -94,9 +90,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
9490
[&] {
9591
(void)connman.GetNodeCount(fuzzed_data_provider.PickValueInArray({ConnectionDirection::None, ConnectionDirection::In, ConnectionDirection::Out, ConnectionDirection::Both}));
9692
},
97-
[&] {
98-
connman.MarkAddressGood(random_address);
99-
},
10093
[&] {
10194
(void)connman.OutboundTargetReached(fuzzed_data_provider.ConsumeBool());
10295
},

0 commit comments

Comments
 (0)