diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-02-04 14:38:58 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-02-04 14:54:23 +0100 |
| commit | 4f4dc5ef7295e85531127cd08a822291e548b2f0 (patch) | |
| tree | 969a8496e18ea37ef69be7c6cef927d28074bf48 /src/wallet | |
| parent | Merge #7192: Unify product name to as few places as possible (diff) | |
| parent | ATMP: make nAbsurdFee const (diff) | |
| download | discoin-4f4dc5ef7295e85531127cd08a822291e548b2f0.tar.xz discoin-4f4dc5ef7295e85531127cd08a822291e548b2f0.zip | |
Merge #7070: Move maxTxFee out of mempool
fad6244 ATMP: make nAbsurdFee const (MarcoFalke)
fa762d0 [wallet.h] Remove main.h include (MarcoFalke)
fa79db2 Move maxTxFee out of mempool (MarcoFalke)
Diffstat (limited to 'src/wallet')
| -rw-r--r-- | src/wallet/wallet.cpp | 8 | ||||
| -rw-r--r-- | src/wallet/wallet.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index dd9d549f6..ca7cd0c28 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 28d2f8a04..c02323d6e 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -204,8 +204,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, const CAmount nAbsurdFee); bool hashUnset() const { return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); } bool isAbandoned() const { return (hashBlock == ABANDON_HASH); } void setAbandoned() { hashBlock = ABANDON_HASH; } |