coin_mvt: mark every event that already has a destination

Every event that's coming out of here that specifies a different place
to be deposited should be marked as originating from this channel's
 account.
This commit is contained in:
niftynei 2022-02-08 14:40:55 -06:00 committed by Rusty Russell
parent b30328a91f
commit 12cbf614cd

View file

@ -266,7 +266,7 @@ static void handle_onchain_log_coin_move(struct channel *channel, const u8 *msg)
if (!mvt->account_name)
mvt->account_name = type_to_string(mvt, struct channel_id,
&channel->cid);
else if (chain_mvt_is_external(mvt))
else
mvt->originating_acct = type_to_string(mvt, struct channel_id,
&channel->cid);
notify_chain_mvt(channel->peer->ld, mvt);