mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
txwatch: hand ld to callback, don't assume channel is non-NULL.
We're about to use the txwatch facility for UTXOs, where there's no channel, so allow that the be NULL, and hand the struct lightningd which callers want anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
5d23698665
commit
05f12edf60
@@ -12,6 +12,7 @@ struct bitcoin_tx;
|
||||
struct block;
|
||||
struct channel;
|
||||
struct chain_topology;
|
||||
struct lightningd;
|
||||
struct txowatch;
|
||||
struct txwatch;
|
||||
|
||||
@@ -43,17 +44,19 @@ struct txwatch *watch_txid(const tal_t *ctx,
|
||||
struct chain_topology *topo,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_txid *txid,
|
||||
enum watch_result (*cb)(struct channel *channel,
|
||||
const struct bitcoin_txid *,
|
||||
enum watch_result (*cb)(struct lightningd *ld,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_txid *,
|
||||
unsigned int depth));
|
||||
|
||||
struct txwatch *watch_tx(const tal_t *ctx,
|
||||
struct chain_topology *topo,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_tx *tx,
|
||||
enum watch_result (*cb)(struct channel *channel,
|
||||
const struct bitcoin_txid *,
|
||||
unsigned int depth));
|
||||
enum watch_result (*cb)(struct lightningd *ld,
|
||||
struct channel *channel,
|
||||
const struct bitcoin_txid *,
|
||||
unsigned int depth));
|
||||
|
||||
struct txowatch *watch_txo(const tal_t *ctx,
|
||||
struct chain_topology *topo,
|
||||
|
||||
Reference in New Issue
Block a user