aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2015-11-20 16:48:06 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-02-02 20:08:51 +0100
commitfa79db2641182b47b4077345d8261d28c4a87bf0 (patch)
treec6ff08fcad0581a631a82b97835929ffef27b23c /src/wallet
parentfd13fe7ca01b6104ce591af2b90ee6951ccc5a16 (diff)
Move maxTxFee out of mempool
Also, remove default values in CMerkleTx::AcceptToMemoryPool()
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp8
-rw-r--r--src/wallet/wallet.h5
2 files changed, 7 insertions, 6 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index dd9d549f66..ca7cd0c285 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1251,7 +1251,7 @@ void CWallet::ReacceptWalletTransactions()
CWalletTx& wtx = *(item.second);
LOCK(mempool.cs);
- wtx.AcceptToMemoryPool(false);
+ wtx.AcceptToMemoryPool(false, maxTxFee);
}
}
@@ -2268,7 +2268,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
if (fBroadcastTransactions)
{
// Broadcast
- if (!wtxNew.AcceptToMemoryPool(false))
+ if (!wtxNew.AcceptToMemoryPool(false, maxTxFee))
{
// This must not fail. The transaction has already been signed and recorded.
LogPrintf("CommitTransaction(): Error: Transaction not valid\n");
@@ -3025,8 +3025,8 @@ int CMerkleTx::GetBlocksToMaturity() const
}
-bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, bool fRejectAbsurdFee)
+bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, CAmount nAbsurdFee)
{
CValidationState state;
- return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, false, fRejectAbsurdFee);
+ return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, false, nAbsurdFee);
}
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 28d2f8a04f..c5b2771515 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -7,6 +7,7 @@
#define BITCOIN_WALLET_WALLET_H
#include "amount.h"
+#include "main.h"
#include "streams.h"
#include "tinyformat.h"
#include "ui_interface.h"
@@ -204,8 +205,8 @@ public:
int GetDepthInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
bool IsInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet) > 0; }
int GetBlocksToMaturity() const;
- /** Pass this transaction to the mempool. Fails if absolute fee exceeds maxTxFee. */
- bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectAbsurdFee=true);
+ /** Pass this transaction to the mempool. Fails if absolute fee exceeds absurd fee. */
+ bool AcceptToMemoryPool(bool fLimitFree, CAmount nAbsurdFee);
bool hashUnset() const { return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); }
bool isAbandoned() const { return (hashBlock == ABANDON_HASH); }
void setAbandoned() { hashBlock = ABANDON_HASH; }