diff --git a/common/coin_mvt.c b/common/coin_mvt.c index c0ca08777..12d758f4d 100644 --- a/common/coin_mvt.c +++ b/common/coin_mvt.c @@ -376,8 +376,6 @@ struct coin_mvt *finalize_channel_mvt(const tal_t *ctx, mvt->fees = tal(mvt, struct amount_msat); *mvt->fees = chan_mvt->fees; mvt->timestamp = timestamp; - /* channel movements don't have a blockheight */ - mvt->blockheight = 0; mvt->version = COIN_MVT_VERSION; mvt->node_id = tal_dup(mvt, struct node_id, node_id); diff --git a/common/coin_mvt.h b/common/coin_mvt.h index 0995c9eda..c34f03792 100644 --- a/common/coin_mvt.h +++ b/common/coin_mvt.h @@ -74,8 +74,7 @@ struct chain_coin_mvt { /* label / tag array */ enum mvt_tag *tags; - /* block this transaction is confirmed in - * zero means it's unknown/unconfirmed */ + /* block this transaction is confirmed in */ u32 blockheight; /* only one or the other */ diff --git a/doc/PLUGINS.md b/doc/PLUGINS.md index cc6d1ac0f..487a65349 100644 --- a/doc/PLUGINS.md +++ b/doc/PLUGINS.md @@ -713,7 +713,7 @@ i.e. only definitively resolved HTLCs or confirmed bitcoin transactions. "output_count": 2, // ('chain_mvt' only, typically only channel closes) "fees": "382msat", // ('channel_mvt' only) "tags": ["deposit"], - "blockheight":102, // (May be null) + "blockheight":102, // 'chain_mvt' only "timestamp":1585948198, "coin_type":"bc" } diff --git a/lightningd/notification.c b/lightningd/notification.c index c77fa24c4..983e9fc74 100644 --- a/lightningd/notification.c +++ b/lightningd/notification.c @@ -493,14 +493,9 @@ static void coin_movement_notification_serialize(struct json_stream *stream, json_add_string(stream, NULL, mvt_tag_str(mvt->tags[i])); json_array_end(stream); - /* Only chain movements have blockheights. A blockheight - * of 'zero' means we haven't seen this tx confirmed yet. */ - if (mvt->type == CHAIN_MVT) { - if (mvt->blockheight) - json_add_u32(stream, "blockheight", mvt->blockheight); - else - json_add_null(stream, "blockheight"); - } + if (mvt->type == CHAIN_MVT) + json_add_u32(stream, "blockheight", mvt->blockheight); + json_add_u32(stream, "timestamp", mvt->timestamp); json_add_string(stream, "coin_type", mvt->hrp_name);