From 75b751ec17cc46bad27ab049021a00b03c5434a2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 21 Oct 2016 16:56:27 -0300 Subject: [PATCH] test --- src/main.cpp | 2 +- src/miner.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 00180caa0..f0f59b21c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2153,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->pprev->nTime)-tx.GetValueOut(); + nFees += view.GetValueIn(tx,chainActive.Tip()->nTime)-tx.GetValueOut(); std::vector vChecks; if (!ContextualCheckInputs(tx, state, view, fScriptChecks, flags, false, chainparams.GetConsensus(), nScriptCheckThreads ? &vChecks : NULL)) diff --git a/src/miner.cpp b/src/miner.cpp index faac50bc4..e34e05904 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -275,7 +275,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if (!view.HaveInputs(tx)) continue; - CAmount nTxFees = view.GetValueIn(tx,pblock->nTime)-tx.GetValueOut(); + CAmount nTxFees = view.GetValueIn(tx,chainActive.Tip()->nTime)-tx.GetValueOut(); nTxSigOps += GetP2SHSigOpCount(tx, view); if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS)