This commit is contained in:
blackjok3r
2018-10-30 00:10:41 +08:00
parent 71c5790266
commit 6f84a8cb23
2 changed files with 4 additions and 4 deletions

View File

@@ -1310,7 +1310,7 @@ CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowF
} }
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,bool* pfMissingInputs, bool fRejectAbsurdFee, boost::optional<int> bool_nullifiers) bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,bool* pfMissingInputs, bool fRejectAbsurdFee, bool fNullifiers)
{ {
AssertLockHeld(cs_main); AssertLockHeld(cs_main);
if (pfMissingInputs) if (pfMissingInputs)
@@ -1391,7 +1391,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
return false; return false;
} }
} }
if (!bool_nullifiers) if (fNullifiers == true)
{ {
BOOST_FOREACH(const JSDescription &joinsplit, tx.vjoinsplit) BOOST_FOREACH(const JSDescription &joinsplit, tx.vjoinsplit)
{ {
@@ -4316,7 +4316,7 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C
BOOST_FOREACH(const CTxMemPoolEntry& e, tmpmempool.mapTx) { BOOST_FOREACH(const CTxMemPoolEntry& e, tmpmempool.mapTx) {
CTransaction tx = e.GetTx(); CTransaction tx = e.GetTx();
CValidationState state; bool fMissingInputs,fOverrideFees = false; CValidationState state; bool fMissingInputs,fOverrideFees = false;
if (AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, !fOverrideFees,1) == false ); if (AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, !fOverrideFees,true) == false );
invalidtxs++; invalidtxs++;
fprintf(stderr, "added mempool tx back to mempool\n"); fprintf(stderr, "added mempool tx back to mempool\n");
} }

View File

@@ -267,7 +267,7 @@ void PruneAndFlush();
/** (try to) add transaction to memory pool **/ /** (try to) add transaction to memory pool **/
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree, bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
bool* pfMissingInputs, bool fRejectAbsurdFee=false, boost::optional<int> bool_nullifiers); bool* pfMissingInputs, bool fRejectAbsurdFee=false, bool fNullifiers=false);
struct CNodeStateStats { struct CNodeStateStats {