Browse Source

routing: fix hash of pubkeys.

Found by PVS Studio.

Reported-by: Jon Griffiths <jgriffiths@blockstream.io>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
fa402aac31
  1. 2
      daemon/routing.c

2
daemon/routing.c

@ -21,7 +21,7 @@ static const secp256k1_pubkey *keyof_node(const struct node *n)
static size_t hash_key(const secp256k1_pubkey *key)
{
return siphash24(siphash_seed(), key, sizeof(key));
return siphash24(siphash_seed(), key, sizeof(*key));
}
static bool node_eq(const struct node *n, const secp256k1_pubkey *key)

Loading…
Cancel
Save