Files
lightning/lightningd
Rusty Russell 1d9a8e5484 chaintopology: load forwards, not backwards.
We used to load the new tip and work backwards until we joined up with
the previous tip.  That consumed quite a lot of memory if there were
many blocks.

Instead, just poll on blocknum+1, and grab it once that succeeds.  If
prev is different from what we expect (reorg), we free the current tip
and try again.

We could theoretically miss a reorg which is the same length (2 block
reorg with more work due to difficulty adjustment), but even if that
happened we'd catch up on the next block.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-21 14:33:27 +01:00
..
2017-10-20 18:31:32 +02:00
2017-10-26 21:01:09 +00:00
2017-10-26 21:01:09 +00:00
2017-12-20 12:43:10 +01:00
2017-12-20 12:43:10 +01:00
2017-12-20 12:43:10 +01:00
2017-12-21 09:56:20 +00:00
2017-12-21 09:56:20 +00:00
2017-10-26 21:01:09 +00:00
2017-12-20 12:43:10 +01:00