Use DOS level 100 for noncontextual checks.

Co-authored-by: str4d <jack@electriccoin.co>
This commit is contained in:
Kris Nuttycombe 2021-07-30 11:14:28 -06:00 committed by GitHub
parent f4fe590eea
commit 8a904c0a8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1487,19 +1487,19 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
size_t max_elements = (1 << 16) - 1;
if (tx.vShieldedSpend.size() > max_elements) {
return state.DoS(
dosLevelPotentiallyRelaxing,
100,
error("ContextualCheckTransaction(): 2^16 or more Sapling spends"),
REJECT_INVALID, "bad-tx-too-many-sapling-spends");
}
if (tx.vShieldedOutput.size() > max_elements) {
return state.DoS(
dosLevelPotentiallyRelaxing,
100,
error("ContextualCheckTransaction(): 2^16 or more Sapling outputs"),
REJECT_INVALID, "bad-tx-too-many-sapling-outputs");
}
if (orchard_bundle.GetNumActions() > max_elements) {
return state.DoS(
dosLevelPotentiallyRelaxing,
100,
error("ContextualCheckTransaction(): 2^16 or more Orchard actions"),
REJECT_INVALID, "bad-tx-too-many-orchard-actions");
}