Open
Description
I was looking into #5626 and noticed that all iterators require exclusive (mutable) access to the whole KBucketsTable
, moreover, its buckets are being modified during iteration over k-buckets, which is extremely confusing and feels like a completely arbitrary place to do this:
rust-libp2p/protocols/kad/src/kbucket.rs
Lines 463 to 501 in 417968e
Specifically this part:
rust-libp2p/protocols/kad/src/kbucket.rs
Lines 482 to 485 in 417968e
I did a quick look around, but wasn't able to easily fix this. Someone with better knowledge of the codebase should look into it. It is very hard to maintain the project when code so convoluted.
Metadata
Metadata
Assignees
Labels
No labels