From e4c35569aefb1995097f06074a8fdaca7c4dbbe2 Mon Sep 17 00:00:00 2001 From: Jeffrey Ryan Date: Fri, 12 Mar 2021 14:51:42 -0600 Subject: [PATCH] Fixed Daemon.block bug for height=0 (#93) If you called daemon.block(height=0) then the expression: if not height and not bhash: Is `True` because 0 is falsey. I changed that line to a slightly more wordy, but more accurate: if height is None and bhash is None: --- monero/daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monero/daemon.py b/monero/daemon.py index 0b8d4e7..6f4831e 100644 --- a/monero/daemon.py +++ b/monero/daemon.py @@ -74,7 +74,7 @@ class Daemon(object): :rtype: :class:`Block ` """ - if not height and not bhash: + if height is None and bhash is None: raise ValueError("Height or hash must be specified") return self._backend.block(bhash=bhash, height=height)