rule110-io / surge

Surge is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source.
https://getsurge.io
Apache License 2.0
428 stars 50 forks source link

filter saved rpc nodes and sort by latency #56

Closed yilunzhang closed 3 years ago

yilunzhang commented 3 years ago

This will greatly improve future RPC response time and reliability.

The change is taken from tuna repo https://github.com/nknorg/tuna/blob/master/util.go#L202. We found it to be very effective when the saved RPC nodes contains at least one unavailable or poor performance node.