aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcdump.cpp
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2019-01-31 10:46:23 -0800
committerBen Woosley <ben.woosley@gmail.com>2019-01-31 22:10:55 -0800
commit267eac00f968850c859474434570ac8e1fce29f5 (patch)
treef475976fb2608b46a372e6e5b71e0cf9edc17c9c /src/wallet/rpcdump.cpp
parent1971f5ba04de9ac1e1a95d9f727e7bd4bc35dc88 (diff)
downloadbitcoin-267eac00f968850c859474434570ac8e1fce29f5.tar.xz
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
Diffstat (limited to 'src/wallet/rpcdump.cpp')
-rw-r--r--src/wallet/rpcdump.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index 2e62a6979f..0daaf94726 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -785,7 +785,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
file << strprintf("# Wallet dump created by Bitcoin %s\n", CLIENT_BUILD);
file << strprintf("# * Created on %s\n", FormatISO8601DateTime(GetTime()));
const Optional<int> tip_height = locked_chain->getHeight();
- file << strprintf("# * Best block at time of backup was %i (%s),\n", tip_height.value_or(-1), tip_height ? locked_chain->getBlockHash(*tip_height).ToString() : "(missing block hash)");
+ file << strprintf("# * Best block at time of backup was %i (%s),\n", tip_height.get_value_or(-1), tip_height ? locked_chain->getBlockHash(*tip_height).ToString() : "(missing block hash)");
file << strprintf("# mined on %s\n", tip_height ? FormatISO8601DateTime(locked_chain->getBlockTime(*tip_height)) : "(missing block time)");
file << "\n";