Update wire from spec 06a5e6cbdbb4c6f8b8dab444de497cdb9c7d7f02

Only changes revoke_and_ack, which we don't implement yet anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-03-29 21:22:15 +10:30
parent 6e81da3cd2
commit fb80a5f905
2 changed files with 6 additions and 18 deletions

View File

@ -86,9 +86,6 @@ revoke_and_ack,133
revoke_and_ack,0,channel-id,32
revoke_and_ack,32,per-commitment-secret,32
revoke_and_ack,64,next-per-commitment-point,33
revoke_and_ack,97,padding,1
revoke_and_ack,98,num-htlc-timeouts,2
revoke_and_ack,100,htlc-timeout-signature,num-htlc-timeouts*64
update_fee,134
update_fee,0,channel-id,32
update_fee,32,feerate-per-kw,4

View File

@ -126,8 +126,6 @@ struct msg_revoke_and_ack {
struct channel_id channel_id;
struct sha256 per_commitment_secret;
struct pubkey next_per_commitment_point;
u8 padding[1];
secp256k1_ecdsa_signature *htlc_timeout_signature;
};
struct msg_channel_update {
secp256k1_ecdsa_signature signature;
@ -501,24 +499,20 @@ static struct msg_commit_sig *fromwire_struct_commit_sig(const tal_t *ctx, const
static void *towire_struct_revoke_and_ack(const tal_t *ctx,
const struct msg_revoke_and_ack *s)
{
towire_pad_arr = s->padding;
return towire_revoke_and_ack(ctx,
&s->channel_id,
&s->per_commitment_secret,
&s->next_per_commitment_point,
s->htlc_timeout_signature);
&s->next_per_commitment_point);
}
static struct msg_revoke_and_ack *fromwire_struct_revoke_and_ack(const tal_t *ctx, const void *p, size_t *plen)
{
struct msg_revoke_and_ack *s = tal(ctx, struct msg_revoke_and_ack);
fromwire_pad_arr = s->padding;
if (!fromwire_revoke_and_ack(s, p, plen,
&s->channel_id,
&s->per_commitment_secret,
&s->next_per_commitment_point,
&s->htlc_timeout_signature))
if (!fromwire_revoke_and_ack(p, plen,
&s->channel_id,
&s->per_commitment_secret,
&s->next_per_commitment_point))
return tal_free(s);
return s;
@ -780,8 +774,7 @@ static bool funding_created_eq(const struct msg_funding_created *a,
static bool revoke_and_ack_eq(const struct msg_revoke_and_ack *a,
const struct msg_revoke_and_ack *b)
{
return eq_with(a, b, padding)
&& eq_var(a, b, htlc_timeout_signature);
return structeq(a, b);
}
static bool open_channel_eq(const struct msg_open_channel *a,
@ -999,8 +992,6 @@ int main(void)
memset(&raa, 2, sizeof(raa));
set_pubkey(&raa.next_per_commitment_point);
raa.htlc_timeout_signature = tal_arr(ctx, secp256k1_ecdsa_signature, 2);
memset(raa.htlc_timeout_signature, 2, sizeof(secp256k1_ecdsa_signature) * 2);
msg = towire_struct_revoke_and_ack(ctx, &raa);
len = tal_count(msg);