File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -596,6 +596,7 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
596
596
private:
597
597
std::atomic<bool > fAbortRescan {false };
598
598
std::atomic<bool > fScanningWallet {false }; // controlled by WalletRescanReserver
599
+ std::atomic<int64_t > m_scanning_start{0 };
599
600
std::mutex mutexScanning;
600
601
friend class WalletRescanReserver ;
601
602
@@ -820,6 +821,7 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
820
821
void AbortRescan () { fAbortRescan = true ; }
821
822
bool IsAbortingRescan () { return fAbortRescan ; }
822
823
bool IsScanning () { return fScanningWallet ; }
824
+ int64_t ScanningDuration () const { return fScanningWallet ? GetTimeMillis () - m_scanning_start : 0 ; }
823
825
824
826
/* *
825
827
* keystore implementation
@@ -1241,6 +1243,7 @@ class WalletRescanReserver
1241
1243
if (m_wallet->fScanningWallet ) {
1242
1244
return false ;
1243
1245
}
1246
+ m_wallet->m_scanning_start = GetTimeMillis ();
1244
1247
m_wallet->fScanningWallet = true ;
1245
1248
m_could_reserve = true ;
1246
1249
return true ;
You can’t perform that action at this time.
0 commit comments