add local and remote heights to blockchain status

This commit is contained in:
Jack Robison 2017-02-13 14:18:09 -05:00
parent 8859c1b0c1
commit 3cc8a4b168

View file

@ -1049,6 +1049,8 @@ class Daemon(AuthJSONRPCServer):
local_height = self.session.wallet.network.get_local_height()
remote_height = self.session.wallet.network.get_server_height()
response['blocks_behind'] = remote_height - local_height
response['local_height'] = local_height
response['remote_height'] = remote_height
best_hash = yield self.session.wallet.get_best_blockhash()
response['blockchain_status'] = {'best_blockhash': best_hash}
defer.returnValue(response)