Merge bitcoin/bitcoin#25036: wallet: Save wallet scan progress

230a2f4cc3 wallet test: Add unit test for wallet scan save_progress option (Ryan Ofsky)
a89ddfbe22 wallet: Save wallet scan progress (w0xlt)

Pull request description:

  Currently, the wallet scan progress is not saved.
  If it is interrupted,  it will be necessary to start from scratch on the next load.
  This PR changes this and the progress is saved right after checking a block.

  Close https://github.com/bitcoin/bitcoin/issues/25010

ACKs for top commit:
  furszy:
    re-ACK 230a2f4
  achow101:
    ACK 230a2f4cc3
  ryanofsky:
    Code review ACK 230a2f4cc3. Only change since last review is tweaking whitespace and adding log print

Tree-SHA512: 1a9dec207ed22b3443fb06a4daf967637bc02bcaf71c070b7dc33605d0cab959551e4014c9e92293a63f54c5cbcc98bb9f8844a8c60bc32a1482b1c4130fab32
This commit is contained in:
MacroFake
2022-07-12 08:00:28 +02:00
8 changed files with 68 additions and 24 deletions

View File

@@ -111,6 +111,10 @@ public:
//! Get locator for the current chain tip.
virtual CBlockLocator getTipLocator() = 0;
//! Return a locator that refers to a block in the active chain.
//! If specified block is not in the active chain, return locator for the latest ancestor that is in the chain.
virtual CBlockLocator getActiveChainLocator(const uint256& block_hash) = 0;
//! Return height of the highest block on chain in common with the locator,
//! which will either be the original block used to create the locator,
//! or one of its ancestors.