[lightning] save bit number when converting features from clightning

This commit is contained in:
nymkappa
2023-07-05 11:17:04 +02:00
parent 1f003cc292
commit 32d46ad7ac
3 changed files with 7 additions and 1 deletions

View File

@@ -114,12 +114,14 @@ export function convertNode(clNode: any): ILightningApi.Node {
const feature = FeaturesMap.get(i);
if (!feature) {
nodeFeatures.push({
bit: i,
name: 'unknown',
is_required: i % 2 === 0,
is_known: false
});
} else {
nodeFeatures.push({
bit: i,
name: feature,
is_required: i % 2 === 0,
is_known: true

View File

@@ -79,6 +79,7 @@ export namespace ILightningApi {
}
export interface Feature {
bit: number;
name: string;
is_required: boolean;
is_known: boolean;