mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
lightningd/peer_control: keep cryptostate.
Like the fd, it's only useful when the peer is not in a daemon, so we free & NULL it when that happens. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -87,12 +87,15 @@ static void peer_nongossip(struct subd *gossip, const u8 *msg,
|
||||
/* It returned the fd. */
|
||||
assert(peer->fd == -1);
|
||||
peer->fd = peer_fd;
|
||||
assert(peer->cs == NULL);
|
||||
peer->cs = tal_dup(peer, struct crypto_state, &cs);
|
||||
|
||||
peer->gossip_client_fd = gossip_fd;
|
||||
|
||||
log_info(peer->log, "Gossip ended up receipt of %s",
|
||||
wire_type_name(fromwire_peektype(inner)));
|
||||
|
||||
peer_accept_open(peer, &cs, inner);
|
||||
peer_accept_open(peer, inner);
|
||||
}
|
||||
|
||||
static int gossip_msg(struct subd *gossip, const u8 *msg, const int *fds)
|
||||
|
||||
Reference in New Issue
Block a user