1
0

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:
Neil Booth
2015-05-03 15:19:29 +09:00
parent 25c6a78ae0
commit 175bfae9e6
4 changed files with 22 additions and 25 deletions

View File

@@ -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