mirror of https://github.com/status-im/nim-eth.git
Add argument pragma for ping and findnode target node
This commit is contained in:
parent
ff7bed9555
commit
4276e713f4
|
@ -37,16 +37,20 @@ type
|
||||||
discard
|
discard
|
||||||
of ping:
|
of ping:
|
||||||
pingTarget* {.
|
pingTarget* {.
|
||||||
|
argument
|
||||||
desc: "ENR URI of the node to a send ping message"
|
desc: "ENR URI of the node to a send ping message"
|
||||||
name: "node" .}: Node
|
name: "node" .}: Node
|
||||||
of findnode:
|
of findnode:
|
||||||
findNodeTarget* {.
|
|
||||||
desc: "ENR URI of the node to send a findNode message"
|
|
||||||
name: "node" .}: Node
|
|
||||||
distance* {.
|
distance* {.
|
||||||
defaultValue: 255
|
defaultValue: 255
|
||||||
desc: "Distance parameter for the findNode message"
|
desc: "Distance parameter for the findNode message"
|
||||||
name: "distance" .}: uint32
|
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 =
|
proc parseCmdArg*(T: type enr.Record, p: TaintedString): T =
|
||||||
if not fromURI(result, p):
|
if not fromURI(result, p):
|
||||||
|
|
Loading…
Reference in New Issue