Skip to content
Snippets Groups Projects
Commit fd62a86a authored by Moul's avatar Moul
Browse files

[fix] #442: condition to check if block exist failed:

- block root '0' was making the ckech fail.
- Check variable if it's none.
parent 7ede78a6
No related branches found
No related tags found
No related merge requests found
...@@ -288,7 +288,7 @@ class Network(QObject): ...@@ -288,7 +288,7 @@ class Network(QObject):
:return: the number of confirmations of a data :return: the number of confirmations of a data
:rtype: int :rtype: int
""" """
if block_number: if block_number is not None:
if block_number > self.current_blockUID.number: if block_number > self.current_blockUID.number:
raise ValueError("Could not compute confirmations : data block number is after current block") raise ValueError("Could not compute confirmations : data block number is after current block")
return self.current_blockUID.number - block_number + 1 return self.current_blockUID.number - block_number + 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment