Skip to content

BlockValidationState is discarded when processing header fails #48

@stringintech

Description

@stringintech

def process_block_header(self, header: "BlockHeader") -> "BlockValidationState":
"""
Processes and validates the provided block header.
Args:
header: block header to be processed
Returns:
The result of the block header validation
Raises:
ProcessBlockHeaderException: If processing the block header failed. Duplicate block headers do not throw.
"""
state = BlockValidationState()
result = k.btck_chainstate_manager_process_block_header(self, header, state)
if result != 0:
raise ProcessBlockHeaderException(result)
return state

It seems to me that state provides additional info for failure cases (when result != 0) not the other way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions