mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-21 17:42:37 +02:00
[net] remove CConnman::MarkAddressGood
It just forwards calls to CAddrMan::Good.
This commit is contained in:
parent
8073673dbc
commit
bcd7f30b79
@ -2635,11 +2635,6 @@ CConnman::~CConnman()
|
|||||||
Stop();
|
Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConnman::MarkAddressGood(const CAddress& addr)
|
|
||||||
{
|
|
||||||
addrman.Good(addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CConnman::AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty)
|
bool CConnman::AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty)
|
||||||
{
|
{
|
||||||
return addrman.Add(vAddr, addrFrom, nTimePenalty);
|
return addrman.Add(vAddr, addrFrom, nTimePenalty);
|
||||||
|
@ -921,7 +921,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Addrman functions
|
// Addrman functions
|
||||||
void MarkAddressGood(const CAddress& addr);
|
|
||||||
bool AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty = 0);
|
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);
|
std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct);
|
||||||
/**
|
/**
|
||||||
|
@ -2476,7 +2476,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||||||
//
|
//
|
||||||
// This moves an address from New to Tried table in Addrman,
|
// This moves an address from New to Tried table in Addrman,
|
||||||
// resolves tried-table collisions, etc.
|
// resolves tried-table collisions, etc.
|
||||||
m_connman.MarkAddressGood(pfrom.addr);
|
m_addrman.Good(pfrom.addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string remoteAddr;
|
std::string remoteAddr;
|
||||||
|
@ -27,7 +27,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
|
|||||||
SetMockTime(ConsumeTime(fuzzed_data_provider));
|
SetMockTime(ConsumeTime(fuzzed_data_provider));
|
||||||
CAddrMan addrman;
|
CAddrMan addrman;
|
||||||
CConnman connman{fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>(), addrman, fuzzed_data_provider.ConsumeBool()};
|
CConnman connman{fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>(), addrman, fuzzed_data_provider.ConsumeBool()};
|
||||||
CAddress random_address;
|
|
||||||
CNetAddr random_netaddr;
|
CNetAddr random_netaddr;
|
||||||
CNode random_node = ConsumeNode(fuzzed_data_provider);
|
CNode random_node = ConsumeNode(fuzzed_data_provider);
|
||||||
CSubNet random_subnet;
|
CSubNet random_subnet;
|
||||||
@ -35,9 +34,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
|
|||||||
while (fuzzed_data_provider.ConsumeBool()) {
|
while (fuzzed_data_provider.ConsumeBool()) {
|
||||||
CallOneOf(
|
CallOneOf(
|
||||||
fuzzed_data_provider,
|
fuzzed_data_provider,
|
||||||
[&] {
|
|
||||||
random_address = ConsumeAddress(fuzzed_data_provider);
|
|
||||||
},
|
|
||||||
[&] {
|
[&] {
|
||||||
random_netaddr = ConsumeNetAddr(fuzzed_data_provider);
|
random_netaddr = ConsumeNetAddr(fuzzed_data_provider);
|
||||||
},
|
},
|
||||||
@ -94,9 +90,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
|
|||||||
[&] {
|
[&] {
|
||||||
(void)connman.GetNodeCount(fuzzed_data_provider.PickValueInArray({ConnectionDirection::None, ConnectionDirection::In, ConnectionDirection::Out, ConnectionDirection::Both}));
|
(void)connman.GetNodeCount(fuzzed_data_provider.PickValueInArray({ConnectionDirection::None, ConnectionDirection::In, ConnectionDirection::Out, ConnectionDirection::Both}));
|
||||||
},
|
},
|
||||||
[&] {
|
|
||||||
connman.MarkAddressGood(random_address);
|
|
||||||
},
|
|
||||||
[&] {
|
[&] {
|
||||||
(void)connman.OutboundTargetReached(fuzzed_data_provider.ConsumeBool());
|
(void)connman.OutboundTargetReached(fuzzed_data_provider.ConsumeBool());
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user