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

This commit is contained in:
Christian Decker 2019-10-03 19:31:00 +02:00 committed by neil saitug
parent 33bb4f7f58
commit af53e3494b
2 changed files with 6 additions and 2 deletions

View File

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

View File

@ -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(); }