aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2013-06-13 22:28:03 +0200
committerMatt Corallo <git@bluematt.me>2013-06-13 22:28:03 +0200
commitb1f15b218be8dfd1d2dbd375d469794bb7326748 (patch)
tree352477d43c623219e262d3e9db5149ab01e1ba76 /src/main.cpp
parentd1020b780a1493c6a709f70756b2af54a7126f40 (diff)
downloadbitcoin-b1f15b218be8dfd1d2dbd375d469794bb7326748.tar.xz
Remove broken option to skip input checking for wallet txn.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 98921e1423..f0c08d273f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -694,7 +694,7 @@ void CTxMemPool::pruneSpent(const uint256 &hashTx, CCoins &coins)
}
}
-bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fCheckInputs, bool fLimitFree,
+bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fLimitFree,
bool* pfMissingInputs)
{
if (pfMissingInputs)
@@ -751,7 +751,6 @@ bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fCheckIn
}
}
- if (fCheckInputs)
{
CCoinsView dummy;
CCoinsViewCache view(dummy);
@@ -968,15 +967,15 @@ int CMerkleTx::GetBlocksToMaturity() const
}
-bool CMerkleTx::AcceptToMemoryPool(bool fCheckInputs, bool fLimitFree)
+bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree)
{
CValidationState state;
- return mempool.accept(state, *this, fCheckInputs, fLimitFree, NULL);
+ return mempool.accept(state, *this, fLimitFree, NULL);
}
-bool CWalletTx::AcceptWalletTransaction(bool fCheckInputs)
+bool CWalletTx::AcceptWalletTransaction()
{
{
LOCK(mempool.cs);
@@ -987,10 +986,10 @@ bool CWalletTx::AcceptWalletTransaction(bool fCheckInputs)
{
uint256 hash = tx.GetHash();
if (!mempool.exists(hash) && pcoinsTip->HaveCoins(hash))
- tx.AcceptToMemoryPool(fCheckInputs, false);
+ tx.AcceptToMemoryPool(false);
}
}
- return AcceptToMemoryPool(fCheckInputs, false);
+ return AcceptToMemoryPool(false);
}
return false;
}
@@ -1865,7 +1864,7 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew)
BOOST_FOREACH(CTransaction& tx, vResurrect) {
// ignore validation errors in resurrected transactions
CValidationState stateDummy;
- mempool.accept(stateDummy, tx, true, false, NULL);
+ mempool.accept(stateDummy, tx, false, NULL);
}
// Delete redundant memory transactions that are in the connected branch
@@ -3507,7 +3506,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
bool fMissingInputs = false;
CValidationState state;
- if (mempool.accept(state, tx, true, true, &fMissingInputs))
+ if (mempool.accept(state, tx, true, &fMissingInputs))
{
RelayTransaction(tx, inv.hash, vMsg);
mapAlreadyAskedFor.erase(inv);
@@ -3530,7 +3529,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
// Use a dummy CValidationState so someone can't setup nodes to counter-DoS based on orphan resolution (that is, feeding people an invalid transaction based on LegitTxX in order to get anyone relaying LegitTxX banned)
CValidationState stateDummy;
- if (mempool.accept(stateDummy, tx, true, true, &fMissingInputs2))
+ if (mempool.accept(stateDummy, tx, true, &fMissingInputs2))
{
printf(" accepted orphan tx %s\n", inv.hash.ToString().c_str());
RelayTransaction(tx, inv.hash, vMsg);