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>
This commit is contained in:
Rusty Russell 2016-11-01 21:33:06 +10:30
parent 4bb7c5ba7b
commit 5349d2aaa7
1 changed files with 1 additions and 1 deletions

View File

@ -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)