common: expose node_id_hash functions.

They're used in several places, and we're about to add more.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-01-16 13:55:48 +10:30
committed by Alex Myers
parent 0faa8397c3
commit 6a95d3a25e
4 changed files with 22 additions and 26 deletions

View File

@@ -98,11 +98,6 @@ static const struct node_id *node_cache_id(const struct node_id_cache *nc)
return &nc->node_id;
}
static size_t node_id_hash(const struct node_id *id)
{
return siphash24(siphash_seed(), id->k, sizeof(id->k));
}
static bool node_id_cache_eq(const struct node_id_cache *nc,
const struct node_id *node_id)
{