Browse Source

wallet: Annotate only the funding output instead of the whole tx

travis-debug
Christian Decker 5 years ago
committed by neil saitug
parent
commit
af53e3494b
  1. 4
      lightningd/peer_control.c
  2. 4
      lightningd/test/run-invoice-select-inchan.c

4
lightningd/peer_control.c

@ -1018,8 +1018,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);
wallet_annotate_txout(ld->wallet, txid, channel->funding_outnum,
TX_CHANNEL_FUNDING, channel->dbid);
loc = wallet_transaction_locate(tmpctx, ld->wallet, txid);
if (!mk_short_channel_id(&scid,
loc->blkheight, loc->index,

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

@ -474,6 +474,10 @@ void txfilter_add_scriptpubkey(struct txfilter *filter UNNEEDED, const u8 *scrip
/* Generated stub for version */
const char *version(void)
{ fprintf(stderr, "version called!\n"); abort(); }
/* Generated stub for wallet_annotate_txout */
void wallet_annotate_txout(struct wallet *w UNNEEDED, const struct bitcoin_txid *txid UNNEEDED,
int outnum UNNEEDED, enum wallet_tx_type type UNNEEDED, u64 channel UNNEEDED)
{ fprintf(stderr, "wallet_annotate_txout called!\n"); abort(); }
/* Generated stub for wallet_channel_close */
void wallet_channel_close(struct wallet *w UNNEEDED, u64 wallet_id UNNEEDED)
{ fprintf(stderr, "wallet_channel_close called!\n"); abort(); }

Loading…
Cancel
Save