Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 4,659 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
bool CMerkleTx::IsImmatureCoinBase() const { | bool CMerkleTx::IsImmatureCoinBase() const { | ||||
// note GetBlocksToMaturity is 0 for non-coinbase tx | // note GetBlocksToMaturity is 0 for non-coinbase tx | ||||
return GetBlocksToMaturity() > 0; | return GetBlocksToMaturity() > 0; | ||||
} | } | ||||
bool CWalletTx::AcceptToMemoryPool(const Amount nAbsurdFee, | bool CWalletTx::AcceptToMemoryPool(const Amount nAbsurdFee, | ||||
CValidationState &state) | CValidationState &state) { | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | |||||
// Quick check to avoid re-setting fInMempool to false | // Quick check to avoid re-setting fInMempool to false | ||||
if (g_mempool.exists(tx->GetId())) { | if (g_mempool.exists(tx->GetId())) { | ||||
return false; | return false; | ||||
} | } | ||||
// We must set fInMempool here - while it will be re-set to true by the | // We must set fInMempool here - while it will be re-set to true by the | ||||
// entered-mempool callback, if we did not there would be a race where a | // entered-mempool callback, if we did not there would be a race where a | ||||
// user could call sendmoney in a loop and hit spurious out of funds errors | // user could call sendmoney in a loop and hit spurious out of funds errors | ||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |