[lightning] fix node features binary conversion
This commit is contained in:
parent
6336c529ed
commit
8fb67a914c
@ -84,6 +84,8 @@ class NodesApi {
|
|||||||
for (const feature of node.features) {
|
for (const feature of node.features) {
|
||||||
maxBit = Math.max(maxBit, feature.bit);
|
maxBit = Math.max(maxBit, feature.bit);
|
||||||
}
|
}
|
||||||
|
maxBit = Math.ceil(maxBit / 4) * 4 - 1;
|
||||||
|
|
||||||
node.featuresBits = new Array(maxBit + 1).fill(0);
|
node.featuresBits = new Array(maxBit + 1).fill(0);
|
||||||
for (const feature of node.features) {
|
for (const feature of node.features) {
|
||||||
node.featuresBits[feature.bit] = 1;
|
node.featuresBits[feature.bit] = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user