bcoin-org / bcoin

Javascript bitcoin library for node.js and browsers
https://bcoin.io
Other
3.01k stars 811 forks source link

Duplicate node entries being added to pool #1148

Open Pranav0210 opened 1 year ago

Pranav0210 commented 1 year ago

When a new node is added to the pool of the running bcoin node repetitively, each "addnode add" command pushes the hostname to the pool.hosts.nodes[] without verifiying if it already exists in the array and duplicates are created as shown in the output below.

issue However, on running get peerinfo, the redundant entries cannot be seen because the logic provides for checking if a peer already exists in the array.