Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Features/Blockcore.Features.Wallet/WalletSyncManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ public virtual void SyncFromHeight(int height)
this.walletTip = chainedHeader ?? throw new WalletException("Invalid block height");
this.walletManager.WalletTipHash = chainedHeader.HashBlock;
this.walletManager.WalletTipHeight = chainedHeader.Height;

// Rather than waiting for a new block to be received, which could take a while, immediately
// trigger resync from after the newly-set wallet tip through the current consensus tip.
// Note that we are taking advantage of how OnProcessBlockAsync will iterate over any blocks
// in the consensus chain between the wallet tip and this block.
this.ProcessBlock(this.blockStore.GetBlock(this.chainIndexer.Tip.HashBlock));
}

/// <inheritdoc />
Expand Down