mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +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:
@@ -353,7 +353,7 @@ public:
|
||||
LOCK(m_wallet.cs_wallet);
|
||||
auto mi = m_wallet.mapWallet.find(txid);
|
||||
if (mi != m_wallet.mapWallet.end()) {
|
||||
num_blocks = locked_chain->getHeight().value_or(-1);
|
||||
num_blocks = locked_chain->getHeight().get_value_or(-1);
|
||||
in_mempool = mi->second.InMempool();
|
||||
order_form = mi->second.vOrderForm;
|
||||
tx_status = MakeWalletTxStatus(*locked_chain, mi->second);
|
||||
@@ -384,7 +384,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
balances = getBalances();
|
||||
num_blocks = locked_chain->getHeight().value_or(-1);
|
||||
num_blocks = locked_chain->getHeight().get_value_or(-1);
|
||||
return true;
|
||||
}
|
||||
CAmount getBalance() override { return m_wallet.GetBalance(); }
|
||||
|
||||
Reference in New Issue
Block a user