torba
torba copied to clipboard
Support Blockchain Reorganization
- [ ] implement support for detecing reorganizations and recovering
- [x] rewind the headers
- [ ] undo any transactions
- [x] unit tests for rewinding headers
- [ ] unit tests for dropping transactions that happened on removed blocks
- [x] integration tests using
generate
andinvalidateblock
commands
how do reorgs affect files you have on disk and claims you paid for?
@hackrush01 implement this method: https://github.com/lbryio/torba/blob/7a8c2fc98ba31751ec9262ab4adcefe4f6335a9e/torba/client/basedatabase.py#L334
this is the tests for the header rewinding, transaction rewinding would be similar / build on this test: https://github.com/lbryio/torba/blob/master/tests/client_tests/integration/test_blockchain_reorganization.py
This comment will be updated with progress
- [ ] Write test to reproduce the issue (2 points, by conservative estimate)