mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-20 03:30:06 +00:00
d68dcf741e
Sometimes a new block arrives in a new chain that was already the best valid one, but wasn't marked that way. This happens for example when network rules change to recover after a fork. In this case, it is not necessary to do the entire reorganisation inside a single db commit. These can become huge, and exceed the objects/lockers limits in bdb. This patch limits the blocks the actual reorganisation is applied to, and adds the next blocks afterwards in separate db transactions.