2024-01-18 13:19:55 -08:00
|
|
|
#include "config.h"
|
2025-10-22 19:44:27 +10:30
|
|
|
#include <ccan/tal/tal.h>
|
2024-01-18 13:19:55 -08:00
|
|
|
#include <common/hsm_capable.h>
|
|
|
|
|
|
|
|
|
|
/* Is this capability supported by the HSM? (So far, always a message
|
|
|
|
|
* number) */
|
|
|
|
|
bool hsm_is_capable(const u32 *capabilities, u32 msgtype)
|
|
|
|
|
{
|
|
|
|
|
for (size_t i = 0; i < tal_count(capabilities); i++) {
|
|
|
|
|
if (capabilities[i] == msgtype)
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|