Test
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -2585,13 +2585,16 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|||||||
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs-1), nTimeConnect * 0.000001);
|
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs-1), nTimeConnect * 0.000001);
|
||||||
|
|
||||||
CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus());
|
CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus());
|
||||||
//if (block.vtx[0].vout[0].nValue > blockReward)
|
if ( block.vtx[0].GetValueOut() > blockReward)
|
||||||
if (block.vtx[0].GetValueOut() > blockReward)
|
{
|
||||||
return state.DoS(100,
|
if ( nHeight < KOMODO_NOTARIES_HEIGHT1 || block.vtx[0].vout[0].nValue > blockReward )
|
||||||
|
{
|
||||||
|
return state.DoS(100,
|
||||||
error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)",
|
error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)",
|
||||||
block.vtx[0].GetValueOut(), blockReward),
|
block.vtx[0].GetValueOut(), blockReward),
|
||||||
REJECT_INVALID, "bad-cb-amount");
|
REJECT_INVALID, "bad-cb-amount");
|
||||||
|
} else fprintf(stderr,"nHeight.%d coinbase %.8f vs %.8f\n",(int32_t)nHeight,dstr(block.vtx[0].GetValueOut()),dstr(blockReward));
|
||||||
|
}
|
||||||
if (!control.Wait())
|
if (!control.Wait())
|
||||||
return state.DoS(100, false);
|
return state.DoS(100, false);
|
||||||
int64_t nTime2 = GetTimeMicros(); nTimeVerify += nTime2 - nTimeStart;
|
int64_t nTime2 = GetTimeMicros(); nTimeVerify += nTime2 - nTimeStart;
|
||||||
|
|||||||
Reference in New Issue
Block a user