mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-18 21:34:22 +01:00
lightningd/lightningd: add getpeers command.
This has an optional log level if you want to see logs for the peers. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -18,7 +18,17 @@ fi
|
||||
|
||||
lcli1 connect localhost $PORT2 $ID2
|
||||
|
||||
# FIXME: Check status.
|
||||
# Should now be exchanging gossip
|
||||
lcli1 getpeers | $FGREP '"condition" : "Exchanging gossip"'
|
||||
|
||||
# It should have gone through these steps
|
||||
lcli1 getpeers info | $FGREP "Starting handshake as initiator"
|
||||
lcli1 getpeers info | $FGREP "Beginning gossip"
|
||||
lcli1 getpeers info | $FGREP "Exchanging gossip"
|
||||
|
||||
# Both should still be owned by gossip
|
||||
lcli1 getpeers | $FGREP '"owner" : "lightningd_gossip"'
|
||||
lcli2 getpeers | $FGREP '"owner" : "lightningd_gossip"'
|
||||
|
||||
lcli1 stop
|
||||
lcli2 stop
|
||||
|
||||
Reference in New Issue
Block a user