diff --git a/src/coins.cpp b/src/coins.cpp index addbab5bf..5f23528f5 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -390,8 +390,9 @@ CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const CAmount nResult = 0; for (unsigned int i = 0; i < tx.vin.size(); i++) + { nResult += GetOutputFor(tx.vin[i]).nValue; - + } nResult += tx.GetJoinSplitValueIn(); return nResult; diff --git a/src/main.cpp b/src/main.cpp index 2cce7ef67..62a61518d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3068,11 +3068,11 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta // Don't accept any forks from the main chain prior to last checkpoint CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(chainParams.Checkpoints()); if (pcheckpoint && nHeight < pcheckpoint->nHeight) - return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d)", __func__, nHeight)); + return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight)); else if ( nHeight < NOTARIZED_HEIGHT ) { fprintf(stderr,"nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,NOTARIZED_HEIGHT); - return state.DoS(100, error("%s: forked chain older than last notarized (height %d)", __func__, NOTARIZED_HEIGHT)); + return state.DoS(100, error("%s: forked chain older than last notarized (height %d) vs %d", __func__,nHeight, NOTARIZED_HEIGHT)); } else if ( nHeight == NOTARIZED_HEIGHT && memcmp(&hash,&NOTARIZED_HASH,sizeof(hash)) != 0 ) {