Track banned nodes in NodeList #565
Labels
bug
Something isn't working
good first issue
Good for newcomers
p2p
Peer to peer networking
P3
low priority
Right now when xud starts up, it does not track any nodes that have been previously banned. That means that we could theoretically accept a connection with a banned node, resulting in a uniqueness constraint violation when we try to add the banned node to the database.
Instead, when we read from the nodes table and come across a banned node, we should track it in a separate list of banned node pub keys. Then in
Pool.openPeer
we should check to make sure the node pub key of the newly connected peer does not appear in the banned list.This also means that, when a node is banned, we should remove it from the
nodes
map inNodesList
and add its pub key to the list of banned pub keys.The text was updated successfully, but these errors were encountered: