Browse Source

test

pull/4/head
jl777 8 years ago
parent
commit
602dc7445d
  1. 3
      src/coins.cpp
  2. 4
      src/main.cpp

3
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;

4
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 )
{

Loading…
Cancel
Save