src/interfaces/wallet.cpp
//! Construct wallet tx status struct.
Construct wallet tx status struct.
Construct wallet tx status struct .
WalletTxStatus MakeWalletTxStatus(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.blocks_to_maturity = wtx.GetBlocksToMaturity();
    result.depth_in_main_chain = wtx.GetDepthInMainChain();
    result.time_received = wtx.nTimeReceived;
    result.lock_time = wtx.tx->nLockTime;
    result.is_final = wallet.chain().checkFinalTx(*wtx.tx);
    result.is_trusted = wtx.IsTrusted();
    result.is_abandoned = wtx.isAbandoned();
    result.is_coinbase = wtx.IsCoinBase();
    result.is_in_main_chain = wtx.IsInMainChain();
    result.is_coinstake = wtx.IsCoinStake();
    return result;
}
WalletTxStatus MakeWalletTxStatus ( 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 . blocks_to_maturity = wtx . GetBlocksToMaturity ( ) ; result . depth_in_main_chain = wtx . GetDepthInMainChain ( ) ; result . time_received = wtx . nTimeReceived ; result . lock_time = wtx . tx -> nLockTime ; result . is_final = wallet . chain ( ) . checkFinalTx ( * wtx . tx ) ; result . is_trusted = wtx . IsTrusted ( ) ; result . is_abandoned = wtx . isAbandoned ( ) ; result . is_coinbase = wtx . IsCoinBase ( ) ; result . is_in_main_chain = wtx . IsInMainChain ( ) ; result . is_coinstake = wtx . IsCoinStake ( ) ; return result ; }
Construct wallet tx status struct.
Construct wallet tx status struct .