This commit is contained in:
jl777
2016-10-21 16:50:17 -03:00
parent 8a9bc02778
commit f0eb47af80
3 changed files with 6 additions and 7 deletions

View File

@@ -1042,7 +1042,6 @@ 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)
{
uint32_t blocktime = (uint32_t)time(NULL);
AssertLockHeld(cs_main);
if (pfMissingInputs)
*pfMissingInputs = false;
@@ -1133,7 +1132,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
// Bring the best block into scope
view.GetBestBlock();
nValueIn = view.GetValueIn(tx,blocktime);
nValueIn = view.GetValueIn(tx,chainActive.Tip()->nTime);
// we have all inputs cached now, so switch back to dummy, so we don't need to keep lock on mempool
view.SetBackend(dummy);
@@ -2154,7 +2153,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
return state.DoS(100, error("ConnectBlock(): too many sigops"),
REJECT_INVALID, "bad-blk-sigops");
nFees += view.GetValueIn(tx,pindex->nTime)-tx.GetValueOut();
nFees += view.GetValueIn(tx,pindex->pprev->nTime)-tx.GetValueOut();
std::vector<CScriptCheck> vChecks;
if (!ContextualCheckInputs(tx, state, view, fScriptChecks, flags, false, chainparams.GetConsensus(), nScriptCheckThreads ? &vChecks : NULL))