decred / dcrwallet

A secure Decred wallet daemon written in Go (golang).
https://decred.org
ISC License
211 stars 153 forks source link

rpc: allow syncing older tips on test networks #2349

Closed buck54321 closed 2 months ago

buck54321 commented 2 months ago

2340 added additional sync conditions to startup, one of which is that InitialBlockDownload from getblockchaininfo must be true. A condition for InitialBlockDownload to be true is that the best header cannot be older than 24 hours.

In dcrdex, we use a simnet harness that starts with an archived chain with about 600 blocks. Building the chain from scratch takes substantial time, and we can't e.g. mine one block to get a fresh header, because the wallets can't vote.

This change forego's the check of InitialBlockDownload on test networks, leaving in place the condition info.Blocks >= minHeight.

jrick commented 2 months ago

could this not just leave testnet the way it is, and only change the behavior for simnet?

buck54321 commented 2 months ago

could this not just leave testnet the way it is, and only change the behavior for simnet?

Definitely