wallet: Annotate funding transaction in the database

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2019-05-23 23:19:49 +02:00
committed by Rusty Russell
parent 04c255f3ae
commit 7f898aa2a4
2 changed files with 7 additions and 0 deletions

View File

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

View File

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