Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 4,380 Lines • ▼ Show 20 Lines | CKeyPool::CKeyPool(const CPubKey &vchPubKeyIn, bool internalIn) { | ||||
nTime = GetTime(); | nTime = GetTime(); | ||||
vchPubKey = vchPubKeyIn; | vchPubKey = vchPubKeyIn; | ||||
fInternal = internalIn; | fInternal = internalIn; | ||||
m_pre_split = false; | m_pre_split = false; | ||||
} | } | ||||
int CWalletTx::GetDepthInMainChain( | int CWalletTx::GetDepthInMainChain( | ||||
interfaces::Chain::Lock &locked_chain) const { | interfaces::Chain::Lock &locked_chain) const { | ||||
assert(pwallet != nullptr); | |||||
AssertLockHeld(pwallet->cs_wallet); | |||||
if (isUnconfirmed() || isAbandoned()) { | if (isUnconfirmed() || isAbandoned()) { | ||||
return 0; | return 0; | ||||
} | } | ||||
return locked_chain.getBlockDepth(m_confirm.hashBlock) * | return (pwallet->GetLastBlockHeight() - m_confirm.block_height + 1) * | ||||
(isConflicted() ? -1 : 1); | (isConflicted() ? -1 : 1); | ||||
} | } | ||||
int CWalletTx::GetBlocksToMaturity( | int CWalletTx::GetBlocksToMaturity( | ||||
interfaces::Chain::Lock &locked_chain) const { | interfaces::Chain::Lock &locked_chain) const { | ||||
if (!IsCoinBase()) { | if (!IsCoinBase()) { | ||||
return 0; | return 0; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |