mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-13 11:25:02 -05:00
[net] remove CConnman::SetServices
It just forwards calls to CAddrMan::SetServices.
This commit is contained in:
parent
392a95d393
commit
8073673dbc
4 changed files with 1 additions and 14 deletions
|
@ -2635,11 +2635,6 @@ CConnman::~CConnman()
|
||||||
Stop();
|
Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConnman::SetServices(const CService &addr, ServiceFlags nServices)
|
|
||||||
{
|
|
||||||
addrman.SetServices(addr, nServices);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConnman::MarkAddressGood(const CAddress& addr)
|
void CConnman::MarkAddressGood(const CAddress& addr)
|
||||||
{
|
{
|
||||||
addrman.Good(addr);
|
addrman.Good(addr);
|
||||||
|
|
|
@ -921,7 +921,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
// Addrman functions
|
// Addrman functions
|
||||||
void SetServices(const CService &addr, ServiceFlags nServices);
|
|
||||||
void MarkAddressGood(const CAddress& addr);
|
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);
|
||||||
|
|
|
@ -2332,7 +2332,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||||
nServices = ServiceFlags(nServiceInt);
|
nServices = ServiceFlags(nServiceInt);
|
||||||
if (!pfrom.IsInboundConn())
|
if (!pfrom.IsInboundConn())
|
||||||
{
|
{
|
||||||
m_connman.SetServices(pfrom.addr, nServices);
|
m_addrman.SetServices(pfrom.addr, nServices);
|
||||||
}
|
}
|
||||||
if (pfrom.ExpectServicesFromConn() && !HasAllDesirableServiceFlags(nServices))
|
if (pfrom.ExpectServicesFromConn() && !HasAllDesirableServiceFlags(nServices))
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
|
||||||
CAddress random_address;
|
CAddress random_address;
|
||||||
CNetAddr random_netaddr;
|
CNetAddr random_netaddr;
|
||||||
CNode random_node = ConsumeNode(fuzzed_data_provider);
|
CNode random_node = ConsumeNode(fuzzed_data_provider);
|
||||||
CService random_service;
|
|
||||||
CSubNet random_subnet;
|
CSubNet random_subnet;
|
||||||
std::string random_string;
|
std::string random_string;
|
||||||
while (fuzzed_data_provider.ConsumeBool()) {
|
while (fuzzed_data_provider.ConsumeBool()) {
|
||||||
|
@ -42,9 +41,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
|
||||||
[&] {
|
[&] {
|
||||||
random_netaddr = ConsumeNetAddr(fuzzed_data_provider);
|
random_netaddr = ConsumeNetAddr(fuzzed_data_provider);
|
||||||
},
|
},
|
||||||
[&] {
|
|
||||||
random_service = ConsumeService(fuzzed_data_provider);
|
|
||||||
},
|
|
||||||
[&] {
|
[&] {
|
||||||
random_subnet = ConsumeSubNet(fuzzed_data_provider);
|
random_subnet = ConsumeSubNet(fuzzed_data_provider);
|
||||||
},
|
},
|
||||||
|
@ -128,9 +124,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
|
||||||
[&] {
|
[&] {
|
||||||
connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool());
|
connman.SetNetworkActive(fuzzed_data_provider.ConsumeBool());
|
||||||
},
|
},
|
||||||
[&] {
|
|
||||||
connman.SetServices(random_service, ConsumeWeakEnum(fuzzed_data_provider, ALL_SERVICE_FLAGS));
|
|
||||||
},
|
|
||||||
[&] {
|
[&] {
|
||||||
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
|
connman.SetTryNewOutboundPeer(fuzzed_data_provider.ConsumeBool());
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue