daemon/watch.c: move list of watched txs/txouts into struct topology.

This weans daemon/watch.c off relying on struct lightningd_state.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-03-02 22:51:49 +10:30
parent d34dade8bb
commit 923526baf3
8 changed files with 151 additions and 119 deletions

View File

@@ -88,8 +88,6 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
ld->dstate.portnum = DEFAULT_PORT;
ld->dstate.testnet = true;
timers_init(&ld->dstate.timers, time_mono());
txwatch_hash_init(&ld->dstate.txwatches);
txowatch_hash_init(&ld->dstate.txowatches);
list_head_init(&ld->dstate.wallet);
list_head_init(&ld->dstate.addresses);
ld->dstate.dev_never_routefail = false;