Construct wallet tx status struct.
| 92 | |
| 93 | //! Construct wallet tx status struct. |
| 94 | WalletTxStatus MakeWalletTxStatus(const CWallet& wallet, const CWalletTx& wtx) |
| 95 | { |
| 96 | WalletTxStatus result; |
| 97 | result.block_height = |
| 98 | wtx.state<TxStateConfirmed>() ? wtx.state<TxStateConfirmed>()->confirmed_block_height : |
| 99 | wtx.state<TxStateConflicted>() ? wtx.state<TxStateConflicted>()->conflicting_block_height : |
| 100 | std::numeric_limits<int>::max(); |
| 101 | result.blocks_to_maturity = wallet.GetTxBlocksToMaturity(wtx); |
| 102 | result.depth_in_main_chain = wallet.GetTxDepthInMainChain(wtx); |
| 103 | result.time_received = wtx.nTimeReceived; |
| 104 | result.lock_time = wtx.tx->nLockTime; |
| 105 | result.is_trusted = CachedTxIsTrusted(wallet, wtx); |
| 106 | result.is_abandoned = wtx.isAbandoned(); |
| 107 | result.is_coinbase = wtx.IsCoinBase(); |
| 108 | result.is_in_main_chain = wallet.IsTxInMainChain(wtx); |
| 109 | return result; |
| 110 | } |
| 111 | |
| 112 | //! Construct wallet TxOut struct. |
| 113 | WalletTxOut MakeWalletTxOut(const CWallet& wallet, |
no test coverage detected