mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
lightningd: move notify_new_block() callback to peer_htlcs.
And change prototype to take the lightningd structure. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
bdabb24734
commit
9662589ed8
@ -92,8 +92,8 @@ static void connect_block(struct chain_topology *topo,
|
||||
}
|
||||
b->full_txs = tal_free(b->full_txs);
|
||||
|
||||
/* Tell peers about new block. */
|
||||
notify_new_block(topo, b->height);
|
||||
/* Tell lightningd about new block. */
|
||||
notify_new_block(topo->bitcoind->ld, b->height);
|
||||
}
|
||||
|
||||
static const struct bitcoin_tx *tx_in_block(const struct block *b,
|
||||
|
@ -156,7 +156,7 @@ void setup_topology(struct chain_topology *topology,
|
||||
|
||||
struct txlocator *locate_tx(const void *ctx, const struct chain_topology *topo, const struct sha256_double *txid);
|
||||
|
||||
void notify_new_block(struct chain_topology *topo, unsigned int height);
|
||||
void notify_new_block(struct lightningd *ld, unsigned int height);
|
||||
|
||||
#if DEVELOPER
|
||||
void json_dev_broadcast(struct command *cmd,
|
||||
|
@ -32,12 +32,6 @@
|
||||
|
||||
char *bitcoin_datadir;
|
||||
|
||||
void notify_new_block(struct chain_topology *topo, u32 height);
|
||||
void notify_new_block(struct chain_topology *topo, u32 height)
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
|
||||
void db_resolve_invoice(struct lightningd *ld,
|
||||
const char *label);
|
||||
void db_resolve_invoice(struct lightningd *ld,
|
||||
|
@ -1425,3 +1425,9 @@ void peer_htlcs(const tal_t *ctx,
|
||||
fulfilled_htlcs, fulfilled_sides);
|
||||
}
|
||||
}
|
||||
|
||||
void notify_new_block(struct lightningd *ld, u32 height)
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user