mempoolco / spruned

A Bitcoin-without-Blockchain client w/ RPC that can fetch any block or transaction
MIT License
170 stars 35 forks source link

Handle network outages #39

Closed gdassori closed 6 years ago

gdassori commented 6 years ago

On the new ConnectionsPool, when an outage occurs for a bit, finally all the servers are banned, and there's no way for the pool to recover.

a) Expires bans after N, tracking errors timestamps. b) Create a new special state for network outages and suspend some operations like the fallback check_headers. c) Detect network outages and avoid to ban servers during them.

gdassori commented 6 years ago

a) commit 5e62e8e3

gdassori commented 6 years ago

both b) and c) addressed and unittested by commit 03ce911. testing a bit in my env before closing.