diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-10-01 12:23:59 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-10-25 15:57:38 +0200 |
commit | 3449880b499d54bfbcf6caeed52851ce55259ed7 (patch) | |
tree | 2bc425f70886fe8c8cf3803a00784516db2138a4 /src/wallet/wallet.cpp | |
parent | 935c6c4b234bbb0565cda6f58ee298048856acae (diff) | |
download | bitcoin-3449880b499d54bfbcf6caeed52851ce55259ed7.tar.xz |
wallet: fast rescan: show log message for every non-skipped block
For that purpose, a new logging category BCLog::SCAN is introduced.
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 912f995ca2..560058af03 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1849,10 +1849,16 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc if (fast_rescan_filter) { fast_rescan_filter->UpdateIfNeeded(); auto matches_block{fast_rescan_filter->MatchesBlock(block_hash)}; - if (matches_block.has_value() && !*matches_block) { - result.last_scanned_block = block_hash; - result.last_scanned_height = block_height; - fetch_block = false; + if (matches_block.has_value()) { + if (*matches_block) { + LogPrint(BCLog::SCAN, "Fast rescan: inspect block %d [%s] (filter matched)\n", block_height, block_hash.ToString()); + } else { + result.last_scanned_block = block_hash; + result.last_scanned_height = block_height; + fetch_block = false; + } + } else { + LogPrint(BCLog::SCAN, "Fast rescan: inspect block %d [%s] (WARNING: block filter not found!)\n", block_height, block_hash.ToString()); } } |