check for None on height to allow for genesis

This commit is contained in:
Victor Shyba 2018-08-31 11:31:59 -03:00 committed by Lex Berezhny
parent 57abad2181
commit 873437e6a9

View file

@ -86,7 +86,7 @@ class BaseHeaders:
def hash(self, height=None) -> bytes:
return self.hash_header(
self.get_raw_header(height or self.height)
self.get_raw_header(height if height is not None else self.height)
)
@staticmethod