mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-21 08:31:52 +03:00
a48fd43100
* streamable: Merge `strictdataclass` into `Streamable` class * tests: Test not supported streamable types * streamable: Reorder decorators * streamable: Simplify streamable decorator and force correct usage/syntax * streamable: Just move some stuff around in the file * streamable: Improve syntax error messages * mypy: Drop `type_checking.py` and `test_type_checking.py` from exclusion * streamable: Use cached fields instead of `__annotations__` This is now possible after merging `__post_init__` into `Streamable` * Introduce `DefinitionError` as `StreamableError` * `/t` -> ` `
16 lines
481 B
Python
16 lines
481 B
Python
from dataclasses import dataclass
|
|
from typing import Optional
|
|
|
|
from chia.types.spend_bundle_conditions import SpendBundleConditions
|
|
from chia.util.ints import uint16, uint64
|
|
from chia.util.streamable import Streamable, streamable
|
|
|
|
|
|
@streamable
|
|
@dataclass(frozen=True)
|
|
class NPCResult(Streamable):
|
|
error: Optional[uint16]
|
|
conds: Optional[SpendBundleConditions]
|
|
cost: uint64 # The total cost of the block, including CLVM cost, cost of
|
|
# conditions and cost of bytes
|