HomePhabricator

wallet: Write best block to disk before backup

Description

wallet: Write best block to disk before backup

Summary:
This ensures that the best block is included in the backup which leads to a more consistent behavior when loading the backup.

This is a partial backport of core#30678
https://github.com/bitcoin/bitcoin/pull/30678/commits/7e3dbe4180cbeb65e59b53d9fa98509e9189549d
https://github.com/bitcoin/bitcoin/pull/30678/commits/037b101e808ccf9e717751619e04f6e87d614efd

Depends on D17907

Test Plan:
ninja all check-all
I also succesfully ran the wallet_assumeutxo.py test on my assumeutxo dev branch

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17907

Details

Provenance
Fabian Jahr <fjahr@protonmail.com>Authored on Aug 19 2024, 23:23
PiRKCommitted on Tue, Apr 8, 10:31
PiRKPushed on Tue, Apr 8, 10:31
Reviewer
Restricted Project
Differential Revision
D17907: wallet: Write best block to disk before backup
Parents
rABC5b3e01c2c387: indexes, refactor: Remove CChainState use in index CommitInternal method
Branches
Unknown
Tags
Unknown