diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 2ba796205..8cda06283 100644 --- a/lightningd/peer_control.c +++ b/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, diff --git a/lightningd/test/run-invoice-select-inchan.c b/lightningd/test/run-invoice-select-inchan.c index 72dc005cc..21af79a97 100644 --- a/lightningd/test/run-invoice-select-inchan.c +++ b/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(); }