mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
gossip: include chain_hash in gossip messages.
As per lightning-rfc change 956e8809d9d1ee87e31b855923579b96943d5e63 "BOLT 7: add chain_hashes values to channel_update and channel_announcment" Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
ffddb91e3e
commit
91116fe67c
@@ -32,6 +32,7 @@
|
||||
static struct lightningd_state *lightningd_state(void)
|
||||
{
|
||||
struct lightningd_state *dstate = tal(NULL, struct lightningd_state);
|
||||
struct sha256_double unused;
|
||||
|
||||
dstate->log_book = new_log_book(dstate, 20*1024*1024, LOG_INFORM);
|
||||
dstate->base_log = new_log(dstate, dstate->log_book,
|
||||
@@ -45,7 +46,7 @@ static struct lightningd_state *lightningd_state(void)
|
||||
list_head_init(&dstate->wallet);
|
||||
list_head_init(&dstate->addresses);
|
||||
dstate->dev_never_routefail = false;
|
||||
dstate->rstate = new_routing_state(dstate, dstate->base_log);
|
||||
dstate->rstate = new_routing_state(dstate, dstate->base_log, &unused);
|
||||
dstate->reexec = NULL;
|
||||
dstate->external_ip = NULL;
|
||||
dstate->announce = NULL;
|
||||
@@ -89,6 +90,10 @@ int main(int argc, char *argv[])
|
||||
register_opts(dstate);
|
||||
handle_opts(dstate, argc, argv);
|
||||
|
||||
/* Now we can set chain_hash properly. */
|
||||
dstate->rstate->chain_hash
|
||||
= dstate->bitcoind->chainparams->genesis_blockhash;
|
||||
|
||||
/* Activate crash log now we're in the right place. */
|
||||
crashlog_activate(dstate->base_log);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user