mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
doc, test: Test and explain service flag handling
Service flags are handled differently, depending on whether validated (if received from the peer) or unvalidated (received via gossip relay).
This commit is contained in:
@@ -3376,6 +3376,9 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
vRecv >> CNetAddr::V1(addrMe);
|
||||
if (!pfrom.IsInboundConn())
|
||||
{
|
||||
// Overwrites potentially existing services. In contrast to this,
|
||||
// unvalidated services received via gossip relay in ADDR/ADDRV2
|
||||
// messages are only ever added but cannot replace existing ones.
|
||||
m_addrman.SetServices(pfrom.addr, nServices);
|
||||
}
|
||||
if (pfrom.ExpectServicesFromConn() && !HasAllDesirableServiceFlags(nServices))
|
||||
|
||||
Reference in New Issue
Block a user