diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2021-12-09 18:25:22 +0000 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2021-12-28 17:26:24 +0100 |
commit | dad5f760211df314d650999e0a76edb0151b4fe1 (patch) | |
tree | 8e2ea058429dcf71f4729f572d83e5dbf375ad98 /src/addrman_impl.h | |
parent | 7551ae81e1a9d5bf14b434bce7528ac000d8afe1 (diff) |
addrman: Introduce a test-only function to lookup addresses
Co-Authored-By: Martin Zumsande <mzumsande@gmail.com>
Diffstat (limited to 'src/addrman_impl.h')
-rw-r--r-- | src/addrman_impl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/addrman_impl.h b/src/addrman_impl.h index bd7caf473b..04d5fe3053 100644 --- a/src/addrman_impl.h +++ b/src/addrman_impl.h @@ -137,6 +137,9 @@ public: void SetServices(const CService& addr, ServiceFlags nServices) EXCLUSIVE_LOCKS_REQUIRED(!cs); + std::optional<AddressPosition> FindAddressEntry(const CAddress& addr) + EXCLUSIVE_LOCKS_REQUIRED(!cs); + const std::vector<bool>& GetAsmap() const; friend class AddrManTest; @@ -266,6 +269,8 @@ private: std::pair<CAddress, int64_t> SelectTriedCollision_() EXCLUSIVE_LOCKS_REQUIRED(cs); + std::optional<AddressPosition> FindAddressEntry_(const CAddress& addr) EXCLUSIVE_LOCKS_REQUIRED(cs); + //! Consistency check, taking into account m_consistency_check_ratio. //! Will std::abort if an inconsistency is detected. void Check() const EXCLUSIVE_LOCKS_REQUIRED(cs); |