Don't DoS ban peers for possibly valid pegin blocks

This commit is contained in:
instagibbs 2016-05-12 17:05:21 -04:00 committed by Gregory Sanders
parent 17963bfd6e
commit 0caab49550
2 changed files with 3 additions and 1 deletions

View file

@ -2179,8 +2179,9 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
blockReward),
REJECT_INVALID, "bad-cb-amount");
//Don't DoS ban in case of RPC script check failure
if (!control.Wait())
return state.DoS(100, false);
return state.Invalid(false, REJECT_SCRIPT);
int64_t nTime4 = GetTimeMicros(); nTimeVerify += nTime4 - nTime2;
LogPrint("bench", " - Verify %u txins: %.2fms (%.3fms/txin) [%.2fs]\n", nInputs - 1, 0.001 * (nTime4 - nTime2), nInputs <= 1 ? 0 : 0.001 * (nTime4 - nTime2) / (nInputs-1), nTimeVerify * 0.000001);