def make_byzantium_receipt(base_header, transaction, computation, state):
    frontier_receipt = make_frontier_receipt(base_header, transaction, computation, state)

    if computation.is_error:
        status_code = EIP658_TRANSACTION_STATUS_CODE_FAILURE
    else:
        status_code = EIP658_TRANSACTION_STATUS_CODE_SUCCESS

    return frontier_receipt.copy(state_root=status_code)
Example #2
0
    def make_receipt(base_header: BlockHeader, transaction: BaseTransaction,
                     computation: BaseComputation,
                     state: BaseState) -> Receipt:

        receipt_without_state_root = make_frontier_receipt(
            base_header, transaction, computation)

        if computation.is_error:
            status_code = EIP658_TRANSACTION_STATUS_CODE_FAILURE
        else:
            status_code = EIP658_TRANSACTION_STATUS_CODE_SUCCESS

        return receipt_without_state_root.copy(state_root=status_code)