mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
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:
parent
6e81da3cd2
commit
fb80a5f905
2 changed files with 6 additions and 18 deletions
|
@ -86,9 +86,6 @@ revoke_and_ack,133
|
||||||
revoke_and_ack,0,channel-id,32
|
revoke_and_ack,0,channel-id,32
|
||||||
revoke_and_ack,32,per-commitment-secret,32
|
revoke_and_ack,32,per-commitment-secret,32
|
||||||
revoke_and_ack,64,next-per-commitment-point,33
|
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,134
|
||||||
update_fee,0,channel-id,32
|
update_fee,0,channel-id,32
|
||||||
update_fee,32,feerate-per-kw,4
|
update_fee,32,feerate-per-kw,4
|
||||||
|
|
|
@ -126,8 +126,6 @@ struct msg_revoke_and_ack {
|
||||||
struct channel_id channel_id;
|
struct channel_id channel_id;
|
||||||
struct sha256 per_commitment_secret;
|
struct sha256 per_commitment_secret;
|
||||||
struct pubkey next_per_commitment_point;
|
struct pubkey next_per_commitment_point;
|
||||||
u8 padding[1];
|
|
||||||
secp256k1_ecdsa_signature *htlc_timeout_signature;
|
|
||||||
};
|
};
|
||||||
struct msg_channel_update {
|
struct msg_channel_update {
|
||||||
secp256k1_ecdsa_signature signature;
|
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,
|
static void *towire_struct_revoke_and_ack(const tal_t *ctx,
|
||||||
const struct msg_revoke_and_ack *s)
|
const struct msg_revoke_and_ack *s)
|
||||||
{
|
{
|
||||||
towire_pad_arr = s->padding;
|
|
||||||
return towire_revoke_and_ack(ctx,
|
return towire_revoke_and_ack(ctx,
|
||||||
&s->channel_id,
|
&s->channel_id,
|
||||||
&s->per_commitment_secret,
|
&s->per_commitment_secret,
|
||||||
&s->next_per_commitment_point,
|
&s->next_per_commitment_point);
|
||||||
s->htlc_timeout_signature);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct msg_revoke_and_ack *fromwire_struct_revoke_and_ack(const tal_t *ctx, const void *p, size_t *plen)
|
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);
|
struct msg_revoke_and_ack *s = tal(ctx, struct msg_revoke_and_ack);
|
||||||
|
|
||||||
fromwire_pad_arr = s->padding;
|
if (!fromwire_revoke_and_ack(p, plen,
|
||||||
if (!fromwire_revoke_and_ack(s, p, plen,
|
&s->channel_id,
|
||||||
&s->channel_id,
|
&s->per_commitment_secret,
|
||||||
&s->per_commitment_secret,
|
&s->next_per_commitment_point))
|
||||||
&s->next_per_commitment_point,
|
|
||||||
&s->htlc_timeout_signature))
|
|
||||||
return tal_free(s);
|
return tal_free(s);
|
||||||
return 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,
|
static bool revoke_and_ack_eq(const struct msg_revoke_and_ack *a,
|
||||||
const struct msg_revoke_and_ack *b)
|
const struct msg_revoke_and_ack *b)
|
||||||
{
|
{
|
||||||
return eq_with(a, b, padding)
|
return structeq(a, b);
|
||||||
&& eq_var(a, b, htlc_timeout_signature);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool open_channel_eq(const struct msg_open_channel *a,
|
static bool open_channel_eq(const struct msg_open_channel *a,
|
||||||
|
@ -999,8 +992,6 @@ int main(void)
|
||||||
|
|
||||||
memset(&raa, 2, sizeof(raa));
|
memset(&raa, 2, sizeof(raa));
|
||||||
set_pubkey(&raa.next_per_commitment_point);
|
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);
|
msg = towire_struct_revoke_and_ack(ctx, &raa);
|
||||||
len = tal_count(msg);
|
len = tal_count(msg);
|
||||||
|
|
Loading…
Add table
Reference in a new issue