From 39f5662d09dcd13efe382d1c700a8f9a9da324a8 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 14 Nov 2020 19:38:08 +0100 Subject: [PATCH] fapi: provide target_height --- fapi/fapi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fapi/fapi.py b/fapi/fapi.py index 9b8fa21..5723d55 100644 --- a/fapi/fapi.py +++ b/fapi/fapi.py @@ -352,11 +352,12 @@ class FeatherApi: async with aiohttp.ClientSession(**d) as session: async with session.get(f"http://{node}/get_info") as response: blob = await response.json() - for expect in ["nettype", "height"]: + for expect in ["nettype", "height", "target_height"]: assert expect in blob _node = { "address": node, "height": int(blob["height"]), + "target_height": int(blob["target_height"]), "online": True, "nettype": blob["nettype"], "type": k @@ -366,6 +367,7 @@ class FeatherApi: _node = { "address": node, "height": 0, + "target_height": 0, "online": False, "nettype": network_type, "type": k