Page MenuHomePhabricator

[electrum] resolve past single-block reorg
ClosedPublic

Authored by PiRK on Dec 12 2023, 09:53.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCef4e841765f5: [electrum] resolve past single-block reorg
Summary

Wallets that were running during the 821417 single-block reorg are stuck at the height since then, unless the user deleted the blockchain_headers file and forks directory in his data directory.
This diff will allow them to recover from the situation.

Depends on D14964

Test Plan

Make sure the test wallet has a few transactions after block 821417.
Swap the local blockchain_headers file and forks directory with those from a stuck wallet prior to applying this patch. Start Electrum ABC, check that transactions after block 821417 show as "Not verified", and check that in the Network > Overview dialog the Blockchain label says 821417 blocks (while the server heights are much higher and match the current chain tip).

Apply the patch, start the wallet, check that the transactions get verified and the network dialog now shows a local height matching the server heights.
Send a new transaction, let it run for a few blocks and check that everything still works normally.

pytest electrumabc/tests/regtest

Diff Detail