brokenbydefault / Nanollet

The unique ultra-light wallet for Nano/Raiblocks with amazing features, written in Golang.
https://nanollet.org
MIT License
53 stars 7 forks source link

Reload the default nodes if lost connection with all peers. #5

Closed inkeliz closed 6 years ago

inkeliz commented 6 years ago

The Nanollet sets a timeout of two minutes to consider the node offline:

https://github.com/brokenbydefault/Nanollet/blob/9a6082c76d855ef0e9be2502e11ebe0416c87f0f/Node/Peer/peer.go#L20

The node is removed from the list if it's not active. The wallet can run out of peers since all peers might be considered offline, then the wallet can't stablish any new connection.

The solution is load the pre-defined default nodes, if the list is empty.