Skip to content

Commit bd775a2

Browse files
relativisticelectronk9ert
andauthored
Bugfix: during loading: KeyError: 'blocks' (#1859)
* fix #1858 * fix for bug Co-authored-by: k9ert <[email protected]>
1 parent f2fb8f0 commit bd775a2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cryptoadvance/specter/node.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,12 @@ def abortrescanutxo(self):
397397
self.utxorescanwallet = None
398398

399399
def check_blockheight(self):
400-
return self.info["blocks"] != self.rpc.getblockcount()
400+
if not self.rpc:
401+
# if the rpc interface cannot be found, then specter should check the rpc interface.
402+
# Checking the rpc interface with self.node.update_rpc() in specter.check() is done
403+
# if we return True here
404+
return True
405+
return self.info.get("blocks") != self.rpc.getblockcount()
401406

402407
def is_liquid(self):
403408
return is_liquid(self.chain)

0 commit comments

Comments
 (0)