mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
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:
committed by
Alex Myers
parent
0faa8397c3
commit
6a95d3a25e
@@ -192,17 +192,6 @@ static struct command_result *json_getroute(struct command *cmd,
|
||||
return command_finished(cmd, js);
|
||||
}
|
||||
|
||||
static const struct node_id *node_id_keyof(const struct node_id *id)
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
static size_t node_id_hash(const struct node_id *id)
|
||||
{
|
||||
return siphash24(siphash_seed(), id->k, sizeof(id->k));
|
||||
}
|
||||
|
||||
|
||||
HTABLE_DEFINE_TYPE(struct node_id, node_id_keyof, node_id_hash, node_id_eq,
|
||||
node_map);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user