예제 #1
0
class ConstantinopleVM(ByzantiumVM):
    # fork name
    fork = 'constantinople'

    # classes
    block_class = ConstantinopleBlock  # type: Type[BaseBlock]
    _state_class = ConstantinopleState  # type: Type[BaseState]

    # Methods
    create_header_from_parent = staticmethod(
        create_constantinople_header_from_parent)
    compute_difficulty = staticmethod(compute_constantinople_difficulty)
    configure_header = configure_constantinople_header
    get_uncle_reward = staticmethod(get_uncle_reward(EIP1234_BLOCK_REWARD))

    @staticmethod
    def get_block_reward():
        return EIP1234_BLOCK_REWARD
예제 #2
0
파일: __init__.py 프로젝트: WazzaF/py-evm
class PetersburgVM(ByzantiumVM):
    # fork name
    fork = 'petersburg'

    # classes
    block_class: Type[BaseBlock] = PetersburgBlock
    _state_class: Type[BaseState] = PetersburgState

    # Methods
    create_header_from_parent = staticmethod(
        create_petersburg_header_from_parent)  # type: ignore
    compute_difficulty = staticmethod(
        compute_petersburg_difficulty)  # type: ignore
    configure_header = configure_petersburg_header
    get_uncle_reward = staticmethod(get_uncle_reward(EIP1234_BLOCK_REWARD))

    @staticmethod
    def get_block_reward() -> int:
        return EIP1234_BLOCK_REWARD