Commit 4bdc22c
committed
fix(l1): make contact lookup and mutation cover replacement lists
KBucket::get_mut and get_contact only searched the main contact list,
so any state mutation (set_disposable, ping tracking, find_node count,
mark_knows_us) silently failed for contacts in the replacement list.
Since iter_contacts and do_get_contact_to_initiate now return
replacement contacts, this caused phantom contacts that were visible
to selection but invisible to updates.
Update get_contact to use get_any (main + replacements) and get_mut
to search both lists, ensuring all contact state mutations work
regardless of which list holds the contact.1 parent 3430ab4 commit 4bdc22c
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| |||
909 | 912 | | |
910 | 913 | | |
911 | 914 | | |
912 | | - | |
| 915 | + | |
913 | 916 | | |
914 | 917 | | |
915 | | - | |
| 918 | + | |
916 | 919 | | |
917 | 920 | | |
918 | 921 | | |
| |||
0 commit comments