|
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?
py-bitcoinkernel/src/pbk/chain.py
Lines 510 to 528 in b4126a0
It seems to me that
stateprovides additional info for failure cases (whenresult != 0) not the other way?