mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Keep addrman's nService bits consistent with outbound observations
This commit is contained in:
@@ -256,6 +256,9 @@ protected:
|
||||
//! Mark an entry as currently-connected-to.
|
||||
void Connected_(const CService &addr, int64_t nTime);
|
||||
|
||||
//! Update an entry's service bits.
|
||||
void SetServices_(const CService &addr, uint64_t nServices);
|
||||
|
||||
public:
|
||||
/**
|
||||
* serialized format:
|
||||
@@ -589,6 +592,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetServices(const CService &addr, uint64_t nServices)
|
||||
{
|
||||
LOCK(cs);
|
||||
Check();
|
||||
SetServices_(addr, nServices);
|
||||
Check();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // BITCOIN_ADDRMAN_H
|
||||
|
||||
Reference in New Issue
Block a user