chia-blockchain/chia/consensus/cost_calculator.py

16 lines
481 B
Python
Raw Normal View History

2021-01-19 06:14:22 +03:00
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
2020-02-27 04:33:25 +03:00
2021-01-19 06:14:22 +03:00
@streamable
@dataclass(frozen=True)
2021-04-17 09:13:22 +03:00
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