[lightning] fix node features binary conversion
This commit is contained in:
		
							parent
							
								
									422380ef9b
								
							
						
					
					
						commit
						9c7f73b035
					
				@ -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;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user