Describe the bug
When I attempt to use a CLN node as a destination in the defined activity, the simulation does not start and gives the error:
ValidationError("Destination node does not support keysend, cln-0000(0287eb...c97d33)"
However, CLN appears to have keysend enabled and it can send keysend payments when it is used as the source node in the defined activity.
To Reproduce
Configure a simple defined activity with an LND node as the source and a CLN node as the destination.
Possible Solution
I believe this is due to the feature flags not being parsed correctly when creating a CLN node in SimLN.
In the get_node_info function in cln.rs the feature bits are reversed before calling NodeFeatures::from_le_bytes
if let Some(node) = nodes.pop() {
Ok(NodeInfo {
pubkey: *node_id,
alias: node.alias.unwrap_or(String::new()),
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)
}),
})
But in the new function for ClnNode the feature bits are passed directly into NodeFeatures::from_le_bytes.
let features = if let Some(features) = our_features {
NodeFeatures::from_le_bytes(features.node)
} else {
NodeFeatures::empty()
};
Ok(Self {
client,
info: NodeInfo {
pubkey,
features,
alias,
},
})
Describe the bug When I attempt to use a CLN node as a destination in the defined activity, the simulation does not start and gives the error:
However, CLN appears to have keysend enabled and it can send keysend payments when it is used as the source node in the defined activity.
To Reproduce
Configure a simple defined activity with an LND node as the source and a CLN node as the destination.
Possible Solution I believe this is due to the feature flags not being parsed correctly when creating a CLN node in SimLN.
In the
get_node_info
function incln.rs
the feature bits are reversed before callingNodeFeatures::from_le_bytes
But in the
new
function forClnNode
the feature bits are passed directly intoNodeFeatures::from_le_bytes
.