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:
parent
3b3b8fb3ec
commit
ade2242d14
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user