bitcoin: add short_channel_id_dir_eq.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-08-07 11:19:52 +09:30
parent 9935e28358
commit a29d135bee

View File

@ -41,6 +41,12 @@ struct short_channel_id_dir {
int dir;
};
static inline bool short_channel_id_dir_eq(const struct short_channel_id_dir *a,
const struct short_channel_id_dir *b)
{
return short_channel_id_eq(a->scid, b->scid) && a->dir == b->dir;
}
static inline u32 short_channel_id_blocknum(struct short_channel_id scid)
{
return scid.u64 >> 40;