diff --git a/lightning.pb-c.c b/lightning.pb-c.c index 188f77dc2..31523655b 100644 --- a/lightning.pb-c.c +++ b/lightning.pb-c.c @@ -1163,7 +1163,7 @@ const ProtobufCMessageDescriptor anchor__descriptor = (ProtobufCMessageInit) anchor__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCFieldDescriptor open_channel__field_descriptors[7] = +static const ProtobufCFieldDescriptor open_channel__field_descriptors[8] = { { "seed", @@ -1249,6 +1249,18 @@ static const ProtobufCFieldDescriptor open_channel__field_descriptors[7] = 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "tx_version", + 8, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_UINT32, + 0, /* quantifier_offset */ + offsetof(OpenChannel, tx_version), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned open_channel__field_indices_by_name[] = { 6, /* field[6] = anchor */ @@ -1258,11 +1270,12 @@ static const unsigned open_channel__field_indices_by_name[] = { 3, /* field[3] = revocation_hash */ 4, /* field[4] = script_to_me */ 0, /* field[0] = seed */ + 7, /* field[7] = tx_version */ }; static const ProtobufCIntRange open_channel__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 7 } + { 0, 8 } }; const ProtobufCMessageDescriptor open_channel__descriptor = { @@ -1272,7 +1285,7 @@ const ProtobufCMessageDescriptor open_channel__descriptor = "OpenChannel", "", sizeof(OpenChannel), - 7, + 8, open_channel__field_descriptors, open_channel__field_indices_by_name, 1, open_channel__number_ranges, diff --git a/lightning.pb-c.h b/lightning.pb-c.h index 79ea350fd..e23a06223 100644 --- a/lightning.pb-c.h +++ b/lightning.pb-c.h @@ -166,6 +166,10 @@ struct _OpenChannel * The anchor transaction details. */ Anchor *anchor; + /* + * Maximum transaction version we support. + */ + uint32_t tx_version; OpenChannel__LocktimeCase locktime_case; union { uint32_t locktime_seconds; @@ -174,7 +178,7 @@ struct _OpenChannel }; #define OPEN_CHANNEL__INIT \ { PROTOBUF_C_MESSAGE_INIT (&open_channel__descriptor) \ - , 0, NULL, {0,NULL}, 0, NULL, OPEN_CHANNEL__LOCKTIME__NOT_SET, {} } + , 0, NULL, {0,NULL}, 0, NULL, 0, OPEN_CHANNEL__LOCKTIME__NOT_SET, {} } /* diff --git a/lightning.proto b/lightning.proto index b83708f40..82347e401 100644 --- a/lightning.proto +++ b/lightning.proto @@ -65,6 +65,8 @@ message open_channel { required uint64 commitment_fee = 6; // The anchor transaction details. required anchor anchor = 7; + // Maximum transaction version we support. + required uint32 tx_version = 8; } // Supply signature for commitment tx diff --git a/pkt.c b/pkt.c index 084b850ca..a06a9a5f5 100644 --- a/pkt.c +++ b/pkt.c @@ -50,6 +50,7 @@ struct pkt *openchannel_pkt(const tal_t *ctx, o.anchor = anchor; o.locktime_case = OPEN_CHANNEL__LOCKTIME_LOCKTIME_SECONDS; o.locktime_seconds = rel_locktime_seconds; + o.tx_version = 1; return to_pkt(ctx, PKT__PKT_OPEN, &o); }