mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Prefer boost::optional#get_value_or over #value_or
The latter is not defined in the earliest supported version of boost, 1.47. https://www.boost.org/doc/libs/1_47_0/libs/optional/doc/html/boost_optional/detailed_semantics.html https://travis-ci.org/bitcoin/bitcoin/jobs/486674823
This commit is contained in:
@@ -1717,10 +1717,10 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
|
||||
}
|
||||
ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), 100); // hide progress dialog in GUI
|
||||
if (block_height && fAbortRescan) {
|
||||
WalletLogPrintf("Rescan aborted at block %d. Progress=%f\n", block_height.value_or(0), progress_current);
|
||||
WalletLogPrintf("Rescan aborted at block %d. Progress=%f\n", block_height.get_value_or(0), progress_current);
|
||||
result.status = ScanResult::USER_ABORT;
|
||||
} else if (block_height && ShutdownRequested()) {
|
||||
WalletLogPrintf("Rescan interrupted by shutdown request at block %d. Progress=%f\n", block_height.value_or(0), progress_current);
|
||||
WalletLogPrintf("Rescan interrupted by shutdown request at block %d. Progress=%f\n", block_height.get_value_or(0), progress_current);
|
||||
result.status = ScanResult::USER_ABORT;
|
||||
}
|
||||
}
|
||||
@@ -2581,7 +2581,7 @@ static bool IsCurrentForAntiFeeSniping(interfaces::Chain::Lock& locked_chain)
|
||||
*/
|
||||
static uint32_t GetLocktimeForNewTransaction(interfaces::Chain::Lock& locked_chain)
|
||||
{
|
||||
uint32_t const height = locked_chain.getHeight().value_or(-1);
|
||||
uint32_t const height = locked_chain.getHeight().get_value_or(-1);
|
||||
uint32_t locktime;
|
||||
// Discourage fee sniping.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user