Browse Source

[wallet] Set fLimitFree = true

0.14
MarcoFalke 8 years ago
parent
commit
fa28bfa341
  1. 9
      src/wallet/wallet.cpp
  2. 2
      src/wallet/wallet.h

9
src/wallet/wallet.cpp

@ -1405,7 +1405,7 @@ void CWallet::ReacceptWalletTransactions() @@ -1405,7 +1405,7 @@ void CWallet::ReacceptWalletTransactions()
CWalletTx& wtx = *(item.second);
LOCK(mempool.cs);
wtx.AcceptToMemoryPool(false, maxTxFee);
wtx.AcceptToMemoryPool(maxTxFee);
}
}
@ -2450,8 +2450,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) @@ -2450,8 +2450,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
if (fBroadcastTransactions)
{
// Broadcast
if (!wtxNew.AcceptToMemoryPool(false, maxTxFee))
{
if (!wtxNew.AcceptToMemoryPool(maxTxFee)) {
// This must not fail. The transaction has already been signed and recorded.
LogPrintf("CommitTransaction(): Error: Transaction not valid\n");
return false;
@ -3563,8 +3562,8 @@ int CMerkleTx::GetBlocksToMaturity() const @@ -3563,8 +3562,8 @@ int CMerkleTx::GetBlocksToMaturity() const
}
bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, CAmount nAbsurdFee)
bool CMerkleTx::AcceptToMemoryPool(const CAmount& nAbsurdFee)
{
CValidationState state;
return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, false, nAbsurdFee);
return ::AcceptToMemoryPool(mempool, state, *this, true, NULL, false, nAbsurdFee);
}

2
src/wallet/wallet.h

@ -212,7 +212,7 @@ public: @@ -212,7 +212,7 @@ public:
bool IsInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet) > 0; }
int GetBlocksToMaturity() const;
/** Pass this transaction to the mempool. Fails if absolute fee exceeds absurd fee. */
bool AcceptToMemoryPool(bool fLimitFree, const CAmount nAbsurdFee);
bool AcceptToMemoryPool(const CAmount& nAbsurdFee);
bool hashUnset() const { return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); }
bool isAbandoned() const { return (hashBlock == ABANDON_HASH); }
void setAbandoned() { hashBlock = ABANDON_HASH; }

Loading…
Cancel
Save