From 4276e713f4622ecc2f926674ca5296434684d967 Mon Sep 17 00:00:00 2001 From: kdeme Date: Wed, 3 Jun 2020 14:17:50 +0200 Subject: [PATCH] Add argument pragma for ping and findnode target node --- eth/p2p/discoveryv5/dcli.nim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eth/p2p/discoveryv5/dcli.nim b/eth/p2p/discoveryv5/dcli.nim index 7a02fc4..b2f086a 100644 --- a/eth/p2p/discoveryv5/dcli.nim +++ b/eth/p2p/discoveryv5/dcli.nim @@ -37,16 +37,20 @@ type discard of ping: pingTarget* {. + argument desc: "ENR URI of the node to a send ping message" name: "node" .}: Node of findnode: - findNodeTarget* {. - desc: "ENR URI of the node to send a findNode message" - name: "node" .}: Node distance* {. defaultValue: 255 desc: "Distance parameter for the findNode message" name: "distance" .}: uint32 + # TODO: Order here matters as else the help message does not show all the + # information, see: https://github.com/status-im/nim-confutils/issues/15 + findNodeTarget* {. + argument + desc: "ENR URI of the node to send a findNode message" + name: "node" .}: Node proc parseCmdArg*(T: type enr.Record, p: TaintedString): T = if not fromURI(result, p):