From cab781fc93cd8a2ad0bc2636f998c72968776bbc Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Thu, 14 Jun 2018 14:11:00 +0200 Subject: [PATCH] =?UTF-8?q?[enh]=20#42:=C2=A0retrieve=20head=5Fblock=20and?= =?UTF-8?q?=20currency=20params=20at=20the=20beginning.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- silkaj/silkaj.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/silkaj/silkaj.py b/silkaj/silkaj.py index 58669a6f..f978837a 100644 --- a/silkaj/silkaj.py +++ b/silkaj/silkaj.py @@ -8,6 +8,7 @@ from silkaj.cert import send_certification from silkaj.commands import currency_info, difficulties, set_network_sort_keys,\ network_info, argos_info, list_issuers from silkaj.tools import message_exit +from silkaj.network_tools import get_request, get_current_block from silkaj.wot import received_sent_certifications, id_pubkey_correspondence from silkaj.auth import generate_auth_file from silkaj.license import display_license @@ -95,9 +96,14 @@ def cli(): ep["domain"] = ep["domain"][1:-1] return ep, cli_args +def get_parameters(ep): + head_block = get_current_block(ep) + params = get_request(ep, "blockchain/parameters") + return params, head_block def manage_cmd(ep, cli_args): + params, head_block = get_parameters(ep) if cli_args.subcmd == "about": about() elif cli_args.subcmd == "info": -- GitLab