diff --git a/common/coin_mvt.c b/common/coin_mvt.c index 68dd50e65..f523d1b26 100644 --- a/common/coin_mvt.c +++ b/common/coin_mvt.c @@ -320,14 +320,14 @@ struct channel_coin_mvt *new_coin_channel_push(const tal_t *ctx, struct coin_mvt *finalize_chain_mvt(const tal_t *ctx, const struct chain_coin_mvt *chain_mvt, - const char *bip173_name TAKES, + const char *hrp_name TAKES, u32 timestamp, struct node_id *node_id) { struct coin_mvt *mvt = tal(ctx, struct coin_mvt); mvt->account_id = tal_strdup(mvt, chain_mvt->account_name); - mvt->bip173_name = tal_strdup(mvt, bip173_name); + mvt->hrp_name = tal_strdup(mvt, hrp_name); mvt->type = CHAIN_MVT; mvt->id.tx_txid = chain_mvt->tx_txid; @@ -351,7 +351,7 @@ struct coin_mvt *finalize_chain_mvt(const tal_t *ctx, struct coin_mvt *finalize_channel_mvt(const tal_t *ctx, const struct channel_coin_mvt *chan_mvt, - const char *bip173_name TAKES, + const char *hrp_name TAKES, u32 timestamp, const struct node_id *node_id TAKES) { @@ -359,7 +359,7 @@ struct coin_mvt *finalize_channel_mvt(const tal_t *ctx, mvt->account_id = type_to_string(mvt, struct channel_id, &chan_mvt->chan_id); - mvt->bip173_name = tal_strdup(mvt, bip173_name); + mvt->hrp_name = tal_strdup(mvt, hrp_name); mvt->type = CHANNEL_MVT; mvt->id.payment_hash = chan_mvt->payment_hash; mvt->id.part_id = chan_mvt->part_id; diff --git a/common/coin_mvt.h b/common/coin_mvt.h index 75459f773..6905c3257 100644 --- a/common/coin_mvt.h +++ b/common/coin_mvt.h @@ -96,7 +96,9 @@ struct mvt_id { struct coin_mvt { /* name of 'account': wallet, external, */ const char *account_id; - const char *bip173_name; + + /* Chain name: BIP 173, except signet lightning-style: tbs not tb */ + const char *hrp_name; /* type of movement: channel or chain */ enum mvt_type type; @@ -235,14 +237,14 @@ struct channel_coin_mvt *new_coin_channel_push(const tal_t *ctx, struct coin_mvt *finalize_chain_mvt(const tal_t *ctx, const struct chain_coin_mvt *chain_mvt, - const char *bip173_name, + const char *hrp_name, u32 timestamp, struct node_id *node_id) NON_NULL_ARGS(2, 3); struct coin_mvt *finalize_channel_mvt(const tal_t *ctx, const struct channel_coin_mvt *chan_mvt, - const char *bip173_name, + const char *hrp_name, u32 timestamp, const struct node_id *node_id) NON_NULL_ARGS(2, 3, 5); diff --git a/lightningd/notification.c b/lightningd/notification.c index 1b85e3ed4..a93a4d6e5 100644 --- a/lightningd/notification.c +++ b/lightningd/notification.c @@ -495,7 +495,7 @@ static void coin_movement_notification_serialize(struct json_stream *stream, json_add_null(stream, "blockheight"); } json_add_u32(stream, "timestamp", mvt->timestamp); - json_add_string(stream, "coin_type", mvt->bip173_name); + json_add_string(stream, "coin_type", mvt->hrp_name); json_object_end(stream); }