diff options
author | Antoine Riard <ariard@student.42.fr> | 2019-07-09 20:07:39 -0400 |
---|---|---|
committer | Antoine Riard <ariard@student.42.fr> | 2020-04-30 14:31:19 -0400 |
commit | b855592d835bf4b3fb1263b88d4f96669a1722b1 (patch) | |
tree | 8e36d5158106b46fb12b4bb1813eb0685a03d0a7 /src/interfaces/wallet.cpp | |
parent | 0f204dd3f21b997334a0e99954c939db154b64ca (diff) |
[wallet] Move getHeight from Chain::Lock interface to simple Chain
Instead of calling getHeight, we rely on CWallet::m_last_block
processed_height where it's possible.
Diffstat (limited to 'src/interfaces/wallet.cpp')
-rw-r--r-- | src/interfaces/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index 152917ac60..0c31ae0c81 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -228,7 +228,7 @@ public: auto locked_chain = m_wallet->chain().lock(); LOCK(m_wallet->cs_wallet); CTransactionRef tx; - if (!m_wallet->CreateTransaction(*locked_chain, recipients, tx, fee, change_pos, + if (!m_wallet->CreateTransaction(recipients, tx, fee, change_pos, fail_reason, coin_control, sign)) { return {}; } @@ -335,7 +335,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().get_value_or(-1); + num_blocks = m_wallet->GetLastBlockHeight(); in_mempool = mi->second.InMempool(); order_form = mi->second.vOrderForm; tx_status = MakeWalletTxStatus(*locked_chain, mi->second); |