mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
p2p/discover: add sanity check
This commit is contained in:
parent
094dd6e16a
commit
1fc3290b32
1 changed files with 3 additions and 2 deletions
|
|
@ -59,9 +59,10 @@ func (tr *tableRevalidation) nodeAdded(tab *Table, n *node) {
|
|||
|
||||
// nodeRemoved is called when a node was removed from the table.
|
||||
func (tr *tableRevalidation) nodeRemoved(n *node) {
|
||||
if n.revalList != nil {
|
||||
n.revalList.remove(n)
|
||||
if n.revalList == nil {
|
||||
panic(fmt.Errorf("removed node %v has nil revalList", n.ID()))
|
||||
}
|
||||
n.revalList.remove(n)
|
||||
}
|
||||
|
||||
// run performs node revalidation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue