kaspad icon indicating copy to clipboard operation
kaspad copied to clipboard

Don't return banned peers when asking for an address

Open elichai opened this issue 4 years ago • 3 comments

elichai avatar Nov 19 '20 12:11 elichai

Wanted to try out my new go skills and looking for an issue. How can the issue be reproduced?
From looking at the code seems like getRandomAddress returns unbanned address + already connected ones, while isBanned check ignores already connected one, could this be the cause of the issue?
Is there any way of banning addresses except for the using kaspactl?

ev3649 avatar Dec 26 '21 21:12 ev3649

Just looked at AddressManager.RandomAddress. Looks like this issue is already addressed

someone235 avatar Dec 27 '21 21:12 someone235

2021-11-14 12:14:35.198 [INF] CMGR: Connecting to 135.181.223.100:16111
2021-11-14 12:14:35.382 [INF] TXMP: P2P Connected to 135.181.223.100:16111
2021-11-14 12:14:35.382 [INF] PROT: Peer <<nil>: 135.181.223.100:16111> is banned. Disconnecting...

^ This happened after the last change in address manager, so probably still happening, but might be quite an edge case, and as such probably better to remove the "good first task" label.

@someone235 What you think?

svarogg avatar Dec 27 '21 21:12 svarogg