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:
Rusty Russell 2017-11-02 10:23:19 +10:30
parent bdabb24734
commit 9662589ed8
4 changed files with 9 additions and 9 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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 */
}