Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/wallet.cpp
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | static WalletTxStatus MakeWalletTxStatus(const CWalletTx &wtx) | ||||
result.is_coinbase = wtx.IsCoinBase(); | result.is_coinbase = wtx.IsCoinBase(); | ||||
result.is_in_main_chain = wtx.IsInMainChain(); | result.is_in_main_chain = wtx.IsInMainChain(); | ||||
return result; | return result; | ||||
} | } | ||||
//! Construct wallet TxOut struct. | //! Construct wallet TxOut struct. | ||||
static WalletTxOut MakeWalletTxOut(CWallet &wallet, const CWalletTx &wtx, | static WalletTxOut MakeWalletTxOut(CWallet &wallet, const CWalletTx &wtx, | ||||
int n, int depth) | int n, int depth) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | EXCLUSIVE_LOCKS_REQUIRED(cs_main, wallet.cs_wallet) { | ||||
WalletTxOut result; | WalletTxOut result; | ||||
result.txout = wtx.tx->vout[n]; | result.txout = wtx.tx->vout[n]; | ||||
result.time = wtx.GetTxTime(); | result.time = wtx.GetTxTime(); | ||||
result.depth_in_main_chain = depth; | result.depth_in_main_chain = depth; | ||||
result.is_spent = wallet.IsSpent(COutPoint(wtx.GetId(), n)); | result.is_spent = wallet.IsSpent(COutPoint(wtx.GetId(), n)); | ||||
return result; | return result; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 341 Lines • Show Last 20 Lines |