Currently we define TransactionException in two different files:
|
@unique |
|
class TransactionException(ExceptionBase): |
|
""" |
|
Exception raised when a transaction is invalid, and thus cannot be |
|
executed. |
|
|
|
If a transaction with any of these exceptions is included in a block, the |
|
block is invalid. |
|
""" |
|
|
|
TYPE_NOT_SUPPORTED = auto() |
|
"""Transaction type is not supported on this chain configuration.""" |
|
SENDER_NOT_EOA = auto() |
|
"""Transaction is coming from address that is not exist anymore.""" |
|
@unique |
|
class TransactionException(ExceptionBase): |
|
""" |
|
Exception raised when a transaction is invalid, and thus cannot be |
|
executed. |
|
|
|
If a transaction with any of these exceptions is included in a block, the |
|
block is invalid. |
|
""" |
|
|
|
TYPE_NOT_SUPPORTED = auto() |
|
"""Transaction type is not supported on this chain configuration.""" |
|
SENDER_NOT_EOA = auto() |
|
"""Transaction is coming from address that is not exist anymore.""" |
And BlockException also in two different files:
|
@unique |
|
class BlockException(ExceptionBase): |
|
""" |
|
Exception raised when a block is invalid, but not due to a transaction. |
|
|
|
E.g. all transactions in the block are valid, and can be applied to the |
|
state, but the block header contains an invalid field. |
|
""" |
|
|
|
TOO_MANY_UNCLES = auto() |
|
"""Block declares too many uncles over the allowed limit.""" |
|
UNCLE_IN_CHAIN = auto() |
|
"""Block declares uncle header that is already imported into chain.""" |
|
@unique |
|
class BlockException(ExceptionBase): |
|
""" |
|
Exception raised when a block is invalid, but not due to a transaction. |
|
|
|
E.g. all transactions in the block are valid, and can be applied to the |
|
state, but the block header contains an invalid field. |
|
""" |
|
|
|
TOO_MANY_UNCLES = auto() |
|
"""Block declares too many uncles over the allowed limit.""" |
|
UNCLE_IN_CHAIN = auto() |
|
"""Block declares uncle header that is already imported into chain.""" |
They should be defined in a single file.
Currently we define
TransactionExceptionin two different files:execution-specs/packages/testing/src/execution_testing/exceptions/exceptions/transaction.py
Lines 8 to 21 in bff0f2e
execution-specs/packages/testing/src/execution_testing/exceptions/exceptions.py
Lines 124 to 137 in bff0f2e
And
BlockExceptionalso in two different files:execution-specs/packages/testing/src/execution_testing/exceptions/exceptions/block.py
Lines 8 to 20 in bff0f2e
execution-specs/packages/testing/src/execution_testing/exceptions/exceptions.py
Lines 311 to 323 in bff0f2e
They should be defined in a single file.