When deleting an address, the wrong index was being deleted, and if the address to be deleted was present at the end of the array, was not being deleted at all. This was leading to disparity between the addrsBySignatory hashmap and addrsSorted array. This PR fixes that and adds a correctness test to dht_test.go
[x] Correctness tests (might need more)
This bug affects gossiping as well since dht.Addrs(n) uses addrsSorted
When deleting an address, the wrong index was being deleted, and if the address to be deleted was present at the end of the array, was not being deleted at all. This was leading to disparity between the
addrsBySignatory
hashmap andaddrsSorted
array. This PR fixes that and adds a correctness test todht_test.go
This bug affects gossiping as well since
dht.Addrs(n)
usesaddrsSorted