daemon/peer: save their commit key too.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
a5aa7b9abd
commit
d303393d67
|
@ -28,7 +28,8 @@ struct peer {
|
|||
struct log *log;
|
||||
|
||||
/* Keys for transactions with this peer. */
|
||||
struct pubkey commitkey, finalkey;
|
||||
struct pubkey their_commitkey, their_finalkey;
|
||||
struct pubkey our_commitkey, our_finalkey;
|
||||
struct peer_secrets *secrets;
|
||||
};
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ void peer_secrets_init(struct peer *peer)
|
|||
{
|
||||
peer->secrets = tal(peer, struct peer_secrets);
|
||||
|
||||
new_keypair(peer->state, &peer->secrets->commit, &peer->commitkey);
|
||||
new_keypair(peer->state, &peer->secrets->final, &peer->finalkey);
|
||||
new_keypair(peer->state, &peer->secrets->commit, &peer->our_commitkey);
|
||||
new_keypair(peer->state, &peer->secrets->final, &peer->our_finalkey);
|
||||
if (RAND_bytes(peer->secrets->revocation_seed.u.u8,
|
||||
sizeof(peer->secrets->revocation_seed.u.u8)) != 1)
|
||||
fatal("Could not get random bytes for revocation seed");
|
||||
|
|
Loading…
Reference in New Issue