Remove VMError

This commit is contained in:
jangko 2024-06-15 23:19:27 +07:00
parent 351be21c5b
commit 53ce79a9b1
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 3 additions and 7 deletions

View File

@ -21,8 +21,5 @@ type
ValidationError* = object of EVMError
## Error to signal something does not pass a validation check.
VMError* = object of EVMError
## Class of errors which can be raised during VM execution.
CoreDbApiError* = object of CatchableError
## Errors related to `CoreDB` API

View File

@ -91,7 +91,7 @@ proc inPool(ctx: EthWireRef, txHash: Hash256): bool =
proc successorHeader(db: CoreDbRef,
h: BlockHeader,
output: var BlockHeader,
skip = 0'u): bool {.gcsafe, raises: [RlpError].} =
skip = 0'u): bool =
let offset = 1 + skip.BlockNumber
if h.number <= (not 0.BlockNumber) - offset:
result = db.getBlockHeader(h.number + offset, output)
@ -99,15 +99,14 @@ proc successorHeader(db: CoreDbRef,
proc ancestorHeader(db: CoreDbRef,
h: BlockHeader,
output: var BlockHeader,
skip = 0'u): bool {.gcsafe, raises: [RlpError].} =
skip = 0'u): bool =
let offset = 1 + skip.BlockNumber
if h.number >= offset:
result = db.getBlockHeader(h.number - offset, output)
proc blockHeader(db: CoreDbRef,
b: HashOrNum,
output: var BlockHeader): bool
{.gcsafe, raises: [RlpError].} =
output: var BlockHeader): bool =
if b.isHash:
db.getBlockHeader(b.hash, output)
else: