diff options
Diffstat (limited to 'src/wallet/interfaces.cpp')
-rw-r--r-- | src/wallet/interfaces.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/interfaces.cpp b/src/wallet/interfaces.cpp index 57f1a6a67a..6c9d0ca132 100644 --- a/src/wallet/interfaces.cpp +++ b/src/wallet/interfaces.cpp @@ -24,7 +24,7 @@ #include <wallet/ismine.h> #include <wallet/load.h> #include <wallet/receive.h> -#include <wallet/rpcwallet.h> +#include <wallet/rpc/wallet.h> #include <wallet/spend.h> #include <wallet/wallet.h> @@ -82,7 +82,10 @@ WalletTx MakeWalletTx(CWallet& wallet, const CWalletTx& wtx) WalletTxStatus MakeWalletTxStatus(const CWallet& wallet, const CWalletTx& wtx) { WalletTxStatus result; - result.block_height = wtx.m_confirm.block_height > 0 ? wtx.m_confirm.block_height : std::numeric_limits<int>::max(); + result.block_height = + wtx.state<TxStateConfirmed>() ? wtx.state<TxStateConfirmed>()->confirmed_block_height : + wtx.state<TxStateConflicted>() ? wtx.state<TxStateConflicted>()->conflicting_block_height : + std::numeric_limits<int>::max(); result.blocks_to_maturity = wallet.GetTxBlocksToMaturity(wtx); result.depth_in_main_chain = wallet.GetTxDepthInMainChain(wtx); result.time_received = wtx.nTimeReceived; |