From ada03e12fcb3aa84d45dfcc7ce4cf64e5ce69774 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 17 Dec 2019 23:59:44 -0300 Subject: [PATCH] proper check for restrictions on gettx --- torba/torba/client/basenetwork.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torba/torba/client/basenetwork.py b/torba/torba/client/basenetwork.py index e443d2fc1..5a45dc848 100644 --- a/torba/torba/client/basenetwork.py +++ b/torba/torba/client/basenetwork.py @@ -232,7 +232,7 @@ class BaseNetwork: def get_transaction(self, tx_hash, known_height=None): # use any server if its old, otherwise restrict to who gave us the history - restricted = not known_height or 0 > known_height > self.remote_height - 10 + restricted = known_height in (None, -1, 0) or 0 > known_height > self.remote_height - 10 return self.rpc('blockchain.transaction.get', [tx_hash], restricted) def get_transaction_height(self, tx_hash, known_height=None):