lightningd: track channel balance.

This is an approximate result (it's only our confirmed balance, not showing
outstanding HTLCs), but it gives an easy way to check HTLCs have been
resolved.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-04-01 21:28:30 +10:30
parent dc562f0533
commit 85fd8218e2
3 changed files with 23 additions and 5 deletions

View File

@@ -42,6 +42,10 @@ lcli1 fundchannel $ID2 1000000
# Now wait for it to reach depth
lcli1 getpeers info | $FGREP "Waiting for our funding tx"
[ `lcli1 getpeers | get_field msatoshi_to_us` = 1000000000 ]
[ `lcli1 getpeers | get_field msatoshi_to_them` = 0 ]
[ `lcli2 getpeers | get_field msatoshi_to_them` = 1000000000 ]
[ `lcli2 getpeers | get_field msatoshi_to_us` = 0 ]
$CLI generate 10
check "lcli1 getpeers info | $FGREP 'Funding tx reached depth'"