diff options
| author | Suhas Daftuar <[email protected]> | 2019-02-26 14:59:30 -0500 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2019-03-09 07:13:19 +0100 |
| commit | 561b00a02ba88b1c830dbed28d917b8d53199cbf (patch) | |
| tree | f07744ad09bc4ab3bd322049e42aa159e3c0cf89 /src/addrman.cpp | |
| parent | gitian: Improve error handling (diff) | |
| download | discoin-561b00a02ba88b1c830dbed28d917b8d53199cbf.tar.xz discoin-561b00a02ba88b1c830dbed28d917b8d53199cbf.zip | |
[addrman] Improve tried table collision logging
Github-Pull: #15486
Rebased-From: 4d834018e368c3481a5421891395f64aa9002185
Tree-SHA512: c7843191c470d8b3298d4375632ddbcfd26358d21100bcbffa8d40498782f9dfef08cfb7b3c040525ef912b27ddd593322b60f8f21e16e2ae9bae66433ce807e
Diffstat (limited to 'src/addrman.cpp')
| -rw-r--r-- | src/addrman.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp index 06c342ba7..468618095 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -239,7 +239,9 @@ void CAddrMan::Good_(const CService& addr, bool test_before_evict, int64_t nTime // Will moving this address into tried evict another entry? if (test_before_evict && (vvTried[tried_bucket][tried_bucket_pos] != -1)) { - LogPrint(BCLog::ADDRMAN, "Collision inserting element into tried table, moving %s to m_tried_collisions=%d\n", addr.ToString(), m_tried_collisions.size()); + // Output the entry we'd be colliding with, for debugging purposes + auto colliding_entry = mapInfo.find(vvTried[tried_bucket][tried_bucket_pos]); + LogPrint(BCLog::ADDRMAN, "Collision inserting element into tried table (%s), moving %s to m_tried_collisions=%d\n", colliding_entry != mapInfo.end() ? colliding_entry->second.ToString() : "", addr.ToString(), m_tried_collisions.size()); if (m_tried_collisions.size() < ADDRMAN_SET_TRIED_COLLISION_SIZE) { m_tried_collisions.insert(nId); } |