From fd62a86aa1c07f7894b988b037809fbf15cf6ff0 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Mon, 10 Oct 2016 12:17:14 +0200 Subject: [PATCH] [fix] #442: condition to check if block exist failed: - block root '0' was making the ckech fail. - Check variable if it's none. --- src/sakia/core/net/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sakia/core/net/network.py b/src/sakia/core/net/network.py index eec21ff4..6fa6608e 100644 --- a/src/sakia/core/net/network.py +++ b/src/sakia/core/net/network.py @@ -288,7 +288,7 @@ class Network(QObject): :return: the number of confirmations of a data :rtype: int """ - if block_number: + if block_number is not None: if block_number > self.current_blockUID.number: raise ValueError("Could not compute confirmations : data block number is after current block") return self.current_blockUID.number - block_number + 1 -- GitLab