fix: skip ccc.ErrUnknown txns immediately (#1027)

This commit is contained in:
Ömer Faruk Irmak 2024-09-06 16:12:53 +03:00 committed by GitHub
parent bf5cca7c29
commit a4b738f815
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -24,7 +24,7 @@ import (
const ( const (
VersionMajor = 5 // Major version component of the current release VersionMajor = 5 // Major version component of the current release
VersionMinor = 7 // Minor version component of the current release VersionMinor = 7 // Minor version component of the current release
VersionPatch = 10 // Patch version component of the current release VersionPatch = 11 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string VersionMeta = "mainnet" // Version metadata to append to the version string
) )

View file

@ -191,7 +191,7 @@ func (c *AsyncChecker) checkerTask(block *types.Block, ccc *Checker, forkCtx con
err: err, err: err,
// if the txn is the first in block or the additional resource utilization caused // if the txn is the first in block or the additional resource utilization caused
// by this txn alone is enough to overflow the circuit, skip // by this txn alone is enough to overflow the circuit, skip
ShouldSkip: txIdx == 0 || (curRc != nil && curRc.Difference(*accRc).IsOverflown()), ShouldSkip: txIdx == 0 || curRc == nil || curRc.Difference(*accRc).IsOverflown(),
AccRc: curRc, AccRc: curRc,
} }
return failingCallback return failingCallback