Move away from requiring network and blockchain objects to be able to request local height.
We store it in the config object instead of in the blockchain object. The blockchain object now refers to its config, and calls refresh_height() to update it. The network objects also refer to the config rather than the blockchain. This is the first of many small steps to untangle the verifier from stored state and so permit the history tab to work in offline mode. The refactoring will simultaneously clean up a lot of accumulated cruft.
This commit is contained in:
@@ -189,7 +189,7 @@ class NetworkProxy(util.DaemonThread):
|
||||
return self.synchronous_get([('network.get_header', [height])])[0]
|
||||
|
||||
def get_local_height(self):
|
||||
return self.blockchain_height
|
||||
return self.config.height
|
||||
|
||||
def get_server_height(self):
|
||||
return self.server_height
|
||||
|
||||
Reference in New Issue
Block a user