Browse Source

open_channel: say what version txs we'll create.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 10 years ago
parent
commit
94254e7c3f
  1. 19
      lightning.pb-c.c
  2. 6
      lightning.pb-c.h
  3. 2
      lightning.proto
  4. 1
      pkt.c

19
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,

6
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, {} }
/*

2
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

1
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);
}

Loading…
Cancel
Save