Skip to content

Commit a14b850

Browse files
committed
routing: fix candidate selection for BTC payment on RGB channel
1 parent 45c88d7 commit a14b850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/routing/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2771,7 +2771,7 @@ where L::Target: Logger {
27712771
if !features.requires_unknown_bits() {
27722772
for chan_id in $node.channels.iter() {
27732773
let chan = network_channels.get(chan_id).unwrap();
2774-
if !chan.features.requires_unknown_bits() && chan.contract_id == route_params.rgb_payment.map(|(cid, _)| cid) {
2774+
if !chan.features.requires_unknown_bits() && route_params.rgb_payment.map_or(true, |(cid, _)| Some(cid) == chan.contract_id) {
27752775
if let Some((directed_channel, source)) = chan.as_directed_to(&$node_id) {
27762776
if first_hops.is_none() || *source != our_node_id {
27772777
if directed_channel.direction().enabled {

0 commit comments

Comments
 (0)