mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
coin_mvts: don't overwrite account names we add in onchaind
we assume that every event coming from onchaind is for that channel's account, but now that we sometimes track external + wallet events from onchaind, we should only add the channel account name if there's nothing set there already
This commit is contained in:
@@ -276,8 +276,10 @@ static void handle_onchain_log_coin_move(struct channel *channel, const u8 *msg)
|
||||
return;
|
||||
}
|
||||
|
||||
mvt->account_name =
|
||||
type_to_string(mvt, struct channel_id, &channel->cid);
|
||||
/* Any 'ignored' payments get registed to the wallet */
|
||||
if (!mvt->account_name)
|
||||
mvt->account_name = type_to_string(mvt, struct channel_id,
|
||||
&channel->cid);
|
||||
notify_chain_mvt(channel->peer->ld, mvt);
|
||||
tal_free(mvt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user