Browse Source

wallet: Annotate funding transaction in the database

Signed-off-by: Christian Decker <decker.christian@gmail.com>
pull/2938/head
Christian Decker 6 years ago
committed by Rusty Russell
parent
commit
7f898aa2a4
  1. 2
      lightningd/peer_control.c
  2. 5
      lightningd/test/run-invoice-select-inchan.c

2
lightningd/peer_control.c

@ -860,6 +860,8 @@ static enum watch_result funding_depth_cb(struct lightningd *ld,
if ((min_depth_reached && !channel->scid) || (depth && channel->scid)) {
struct txlocator *loc;
wallet_transaction_annotate(ld->wallet, txid,
TX_CHANNEL_FUNDING, channel->dbid);
loc = wallet_transaction_locate(tmpctx, ld->wallet, txid);
if (!mk_short_channel_id(&scid,
loc->blkheight, loc->index,

5
lightningd/test/run-invoice-select-inchan.c

@ -557,6 +557,11 @@ void wallet_peer_delete(struct wallet *w UNNEEDED, u64 peer_dbid UNNEEDED)
/* Generated stub for wallet_total_forward_fees */
struct amount_msat wallet_total_forward_fees(struct wallet *w UNNEEDED)
{ fprintf(stderr, "wallet_total_forward_fees called!\n"); abort(); }
/* Generated stub for wallet_transaction_annotate */
void wallet_transaction_annotate(struct wallet *w UNNEEDED,
const struct bitcoin_txid *txid UNNEEDED, txtypes type UNNEEDED,
u64 channel_id UNNEEDED)
{ fprintf(stderr, "wallet_transaction_annotate called!\n"); abort(); }
/* Generated stub for wallet_transaction_locate */
struct txlocator *wallet_transaction_locate(const tal_t *ctx UNNEEDED, struct wallet *w UNNEEDED,
const struct bitcoin_txid *txid UNNEEDED)

Loading…
Cancel
Save