diff --git a/daemon/peer.h b/daemon/peer.h index e62c5b1a0..1ea0bd424 100644 --- a/daemon/peer.h +++ b/daemon/peer.h @@ -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; }; diff --git a/daemon/secrets.c b/daemon/secrets.c index 61381c7a2..8eef34944 100644 --- a/daemon/secrets.c +++ b/daemon/secrets.c @@ -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");