diff --git a/simln-lib/src/cln.rs b/simln-lib/src/cln.rs index bc9a6efe..700732b4 100644 --- a/simln-lib/src/cln.rs +++ b/simln-lib/src/cln.rs @@ -87,9 +87,8 @@ impl ClnNode { .map_err(|err| LightningError::GetInfoError(err.to_string()))?; connection.id.validate(&pubkey, &mut alias)?; - let features = if let Some(mut features) = our_features { - features.node.reverse(); - NodeFeatures::from_le_bytes(features.node) + let features = if let Some(features) = our_features { + NodeFeatures::from_be_bytes(features.node) } else { NodeFeatures::empty() }; @@ -249,10 +248,8 @@ impl LightningNode for ClnNode { features: node .features .clone() - .map_or(NodeFeatures::empty(), |mut f| { - // We need to reverse this given it has the CLN wire encoding which is BE - f.reverse(); - NodeFeatures::from_le_bytes(f) + .map_or(NodeFeatures::empty(), |f| { + NodeFeatures::from_be_bytes(f) }), }) } else {