Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Never follow bitcoind backwards #3274
Seems we have a bit of collateral damage:
Other than that LGTM
I actually like the change in behavior (refusing to start) if you ask it to rescan from a not-yet-present block, so I've kept and tested that.
This leads to all sorts of problems; in particular it's incredibly slow (days, weeks!) if bitcoind is a long way back. This also changes the behaviour of a rescan argument referring to a future block: we will also refuse to start in that case, which I think is the correct behavior. We already ignore bitcoind if it goes backwards while we're running. Also cover a false positive memleak. Changelog-Fixed: If bitcoind goes backwards (e.g. reindex) refuse to start (unless forced with --rescan). Signed-off-by: Rusty Russell <firstname.lastname@example.org>