Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,845 Lines • ▼ Show 20 Lines | CWallet::ScanResult CWallet::ScanForWalletTransactions( | ||||
{ | { | ||||
fAbortRescan = false; | fAbortRescan = false; | ||||
// Show rescan progress in GUI as dialog or on splashscreen, if -rescan | // Show rescan progress in GUI as dialog or on splashscreen, if -rescan | ||||
// on startup. | // on startup. | ||||
ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), | ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), | ||||
0); | 0); | ||||
BlockHash tip_hash; | BlockHash tip_hash; | ||||
Optional<int> block_height; | // The way the 'block_height' is initialized is just a workaround for | ||||
// the gcc bug #47679 since version 4.6.0. | |||||
Optional<int> block_height = MakeOptional(false, int()); | |||||
double progress_begin; | double progress_begin; | ||||
double progress_end; | double progress_end; | ||||
{ | { | ||||
auto locked_chain = chain().lock(); | auto locked_chain = chain().lock(); | ||||
if (Optional<int> tip_height = locked_chain->getHeight()) { | if (Optional<int> tip_height = locked_chain->getHeight()) { | ||||
tip_hash = locked_chain->getBlockHash(*tip_height); | tip_hash = locked_chain->getBlockHash(*tip_height); | ||||
} | } | ||||
block_height = locked_chain->getBlockHeight(block_hash); | block_height = locked_chain->getBlockHeight(block_hash); | ||||
▲ Show 20 Lines • Show All 3,101 Lines • Show Last 20 Lines |