1
0

interface.get_block_header: assert height >= 0

This commit is contained in:
SomberNight
2022-05-04 17:53:13 +02:00
parent 6a9df7d827
commit 443a76240d

View File

@@ -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)