From 8fb67a914cc3eb12e9d6e74b9f22b08b56ce419a Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sat, 8 Jul 2023 10:59:43 +0200 Subject: [PATCH] [lightning] fix node features binary conversion --- backend/src/api/explorer/nodes.api.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/api/explorer/nodes.api.ts b/backend/src/api/explorer/nodes.api.ts index 40e106345..7d78559c4 100644 --- a/backend/src/api/explorer/nodes.api.ts +++ b/backend/src/api/explorer/nodes.api.ts @@ -84,6 +84,8 @@ class NodesApi { for (const feature of node.features) { maxBit = Math.max(maxBit, feature.bit); } + maxBit = Math.ceil(maxBit / 4) * 4 - 1; + node.featuresBits = new Array(maxBit + 1).fill(0); for (const feature of node.features) { node.featuresBits[feature.bit] = 1;