peer: make id a pointer, NULL until we know peer's ID.

Much better than undefined, and testing for NULL is better than
testing for STATE_INIT.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-07-01 11:27:57 +09:30
parent 7e6dc28f70
commit a613d8d1fb
5 changed files with 23 additions and 12 deletions

View File

@@ -137,7 +137,7 @@ struct peer {
struct netaddr addr;
/* Their ID. */
struct pubkey id;
struct pubkey *id;
/* Current received packet. */
Pkt *inpkt;