Browse Source

daemon: fix up getinfo command, add it to tests.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
e5b2cacd3f
  1. 1
      daemon/jsonrpc.c
  2. 3
      daemon/test/test.sh

1
daemon/jsonrpc.c

@ -292,6 +292,7 @@ static const struct json_command *cmdlist[] = {
&waitinvoice_command, &waitinvoice_command,
&getroute_command, &getroute_command,
&sendpay_command, &sendpay_command,
&getinfo_command,
/* Developer/debugging options. */ /* Developer/debugging options. */
&dev_newhtlc_command, &dev_newhtlc_command,
&dev_fulfillhtlc_command, &dev_fulfillhtlc_command,

3
daemon/test/test.sh

@ -440,8 +440,11 @@ if ! check "$LCLI3 getlog 2>/dev/null | $FGREP Hello"; then
fi fi
ID1=`$LCLI1 getlog | sed -n 's/.*"ID: \([0-9a-f]*\)".*/\1/p'` ID1=`$LCLI1 getlog | sed -n 's/.*"ID: \([0-9a-f]*\)".*/\1/p'`
[ `$LCLI1 getinfo | sed -n 's/.*"id" : "\([0-9a-f]*\)".*/\1/p'` = $ID1 ]
ID2=`$LCLI2 getlog | sed -n 's/.*"ID: \([0-9a-f]*\)".*/\1/p'` ID2=`$LCLI2 getlog | sed -n 's/.*"ID: \([0-9a-f]*\)".*/\1/p'`
[ `$LCLI2 getinfo | sed -n 's/.*"id" : "\([0-9a-f]*\)".*/\1/p'` = $ID2 ]
ID3=`$LCLI3 getlog | sed -n 's/.*"ID: \([0-9a-f]*\)".*/\1/p'` ID3=`$LCLI3 getlog | sed -n 's/.*"ID: \([0-9a-f]*\)".*/\1/p'`
[ `$LCLI3 getinfo | sed -n 's/.*"id" : "\([0-9a-f]*\)".*/\1/p'` = $ID3 ]
PORT2=`$LCLI2 getlog | sed -n 's/.*on port \([0-9]*\).*/\1/p'` PORT2=`$LCLI2 getlog | sed -n 's/.*on port \([0-9]*\).*/\1/p'`
PORT3=`$LCLI3 getlog | sed -n 's/.*on port \([0-9]*\).*/\1/p'` PORT3=`$LCLI3 getlog | sed -n 's/.*on port \([0-9]*\).*/\1/p'`

Loading…
Cancel
Save