diff --git a/lightningd/onchain_control.c b/lightningd/onchain_control.c index 4102b5802..92f25451a 100644 --- a/lightningd/onchain_control.c +++ b/lightningd/onchain_control.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -286,6 +287,7 @@ static void handle_irrevocably_resolved(struct channel *channel, const u8 *msg U static void onchain_add_utxo(struct channel *channel, const u8 *msg) { struct utxo *u = tal(msg, struct utxo); + struct chain_coin_mvt *mvt; u32 blockheight; u->close_info = tal(u, struct unilateral_close_info); @@ -305,6 +307,10 @@ static void onchain_add_utxo(struct channel *channel, const u8 *msg) outpointfilter_add(channel->peer->ld->wallet->owned_outpoints, &u->txid, u->outnum); wallet_add_utxo(channel->peer->ld->wallet, u, p2wpkh); + + mvt = new_chain_coin_mvt_sat(msg, "wallet", &u->txid, &u->txid, u->outnum, + NULL, DEPOSIT, u->amount, true, BTC); + notify_chain_mvt(channel->peer->ld, mvt); } static void onchain_annotate_txout(struct channel *channel, const u8 *msg)