diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index c90424f44..3fab3401a 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -265,11 +266,14 @@ int main(int argc, char *argv[]) /* Load peers from database */ wallet_channels_load_active(ld->wallet, &ld->peers); + + /* TODO(cdecker) Move this into common location for initialization */ struct peer *peer; list_for_each(&ld->peers, peer, list) { populate_peer(ld, peer); peer->seed = tal(peer, struct privkey); derive_peer_seed(ld, peer->seed, &peer->id, peer->channel->id); + peer->htlcs = tal_arr(peer, struct htlc_stub, 0); } /* Create RPC socket (if any) */