don't attempt mempool entry for wallet transactions on startup if already in mempool
This commit is contained in:
parent
24df9af816
commit
6ba8f30e7b
1 changed files with 5 additions and 0 deletions
|
@ -4114,6 +4114,11 @@ int CMerkleTx::GetBlocksToMaturity() const
|
||||||
|
|
||||||
bool CWalletTx::AcceptToMemoryPool(const CAmount& nAbsurdFee, CValidationState& state)
|
bool CWalletTx::AcceptToMemoryPool(const CAmount& nAbsurdFee, CValidationState& state)
|
||||||
{
|
{
|
||||||
|
// Quick check to avoid re-setting fInMempool to false
|
||||||
|
if (mempool.exists(tx->GetHash())) {
|
||||||
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue