Keep addrman's nService bits consistent with outbound observations

This commit is contained in:
Pieter Wuille
2016-03-26 18:58:00 +01:00
parent 44c1b1c9bb
commit 3764dec36c
3 changed files with 33 additions and 0 deletions

View File

@@ -4612,6 +4612,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
CAddress addrFrom;
uint64_t nNonce = 1;
vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe;
if (!pfrom->fInbound)
{
addrman.SetServices(pfrom->addr, pfrom->nServices);
}
if (pfrom->nVersion < MIN_PEER_PROTO_VERSION)
{
// disconnect from peers older than this proto version