lightningd: track balance in way which matches channeld.

Currently it's fairly ad-hoc, but we need to tell it to channeld when
it restarts, so we define it as the non-HTLC balance.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-06-20 15:29:03 +09:30
parent f918c3a0e7
commit a55b58d0d5
4 changed files with 63 additions and 20 deletions

View File

@@ -69,7 +69,7 @@ struct peer {
u16 funding_outnum;
u64 funding_satoshi, push_msat;
/* Channel balance (LOCAL and REMOTE); if we have one. */
/* Amount going to us, not counting unfinished HTLCs; if we have one. */
u64 *balance;
/* Keys for channel. */