Skip to content

continuous resyncing

David Vorick requested to merge sync into master

Added some code to frequently call CatchUp() on a random peer. Because blocking happens while CatchUp() is operating, it won't stack.

It's a bit of a hack, but will overall make the system substantially more robust. Also solves the problem of only relying on one peer when trying to find the longest chain. B/c you're calling CatchUp randomly, if you have a fully updated peer in your set you'll eventually ask it for the blockchain.

I'm not sure how the peer-finding algorithm works, but I'd imagine that's now our biggest weakness. Everything else will more or less converge over time.

Merge request reports