interface.get_block_header: assert height >= 0
This commit is contained in:
@@ -598,6 +598,8 @@ class Interface(Logger):
|
||||
self.logger.info("cert fingerprint verification passed")
|
||||
|
||||
async def get_block_header(self, height, assert_mode):
|
||||
if not is_non_negative_integer(height):
|
||||
raise Exception(f"{repr(height)} is not a block height")
|
||||
self.logger.info(f'requesting block header {height} in mode {assert_mode}')
|
||||
# use lower timeout as we usually have network.bhi_lock here
|
||||
timeout = self.network.get_network_timeout_seconds(NetworkTimeout.Urgent)
|
||||
|
||||
Reference in New Issue
Block a user