addrman, refactor: introduce user-defined type for internal nId

This makes it easier to track which spots refer to an nId
(as opposed to, for example, bucket index etc. which also use int)

Co-authored-by: Pieter Wuille <pieter@wuille.net>

Github-Pull: #30568
Rebased-From: 051ba3290e
This commit is contained in:
Martin Zumsande
2024-08-01 12:46:24 -04:00
committed by fanquake
parent 7fec638222
commit 1d0411dc8f
3 changed files with 41 additions and 37 deletions

View File

@@ -186,7 +186,7 @@ public:
return false;
}
auto IdsReferToSameAddress = [&](int id, int other_id) EXCLUSIVE_LOCKS_REQUIRED(m_impl->cs, other.m_impl->cs) {
auto IdsReferToSameAddress = [&](nid_type id, nid_type other_id) EXCLUSIVE_LOCKS_REQUIRED(m_impl->cs, other.m_impl->cs) {
if (id == -1 && other_id == -1) {
return true;
}