diff --git a/blast_core/src/blast_model_manager.rs b/blast_core/src/blast_model_manager.rs index f414b41..6d05554 100644 --- a/blast_core/src/blast_model_manager.rs +++ b/blast_core/src/blast_model_manager.rs @@ -443,7 +443,7 @@ impl BlastModelManager { }; let chan_string = response.get_ref().channels.clone(); - if chan_string != "" { + if !chan_string.is_empty() { let mut c: Vec = chan_string.split(',').map(|s| s.trim().to_string()).collect(); chans.append(&mut c); } diff --git a/blast_core/src/blast_simln_manager.rs b/blast_core/src/blast_simln_manager.rs index a08dc9e..f948d8b 100644 --- a/blast_core/src/blast_simln_manager.rs +++ b/blast_core/src/blast_simln_manager.rs @@ -129,6 +129,9 @@ impl BlastSimLnManager { for connection in nodes { let node: Arc> = match connection { NodeConnection::LND(c) => { + if c.address.is_empty() { + continue; + } Arc::new(Mutex::new(LndNode::new(c).await?)) }, NodeConnection::CLN(c) => Arc::new(Mutex::new(ClnNode::new(c).await?)), diff --git a/blast_models/blast_ldk/blast_ldk/src/main.rs b/blast_models/blast_ldk/blast_ldk/src/main.rs index 792c515..016a5d0 100644 --- a/blast_models/blast_ldk/blast_ldk/src/main.rs +++ b/blast_models/blast_ldk/blast_ldk/src/main.rs @@ -367,6 +367,8 @@ impl BlastRpc for BlastLdkServer { result.push_str(&format!("{}: {} -> {},", key, &value.source, value.pk.to_string())); } + result.pop(); + let chan_response = BlastGetModelChannelsResponse { channels: result }; let response = Response::new(chan_response); Ok(response) diff --git a/blast_models/blast_lnd/blast_rpc_server.go b/blast_models/blast_lnd/blast_rpc_server.go index 66faf25..8553330 100644 --- a/blast_models/blast_lnd/blast_rpc_server.go +++ b/blast_models/blast_lnd/blast_rpc_server.go @@ -245,7 +245,7 @@ func (s *BlastRpcServer) GetModelChannels(ctx context.Context, request *pb.Blast result := sb.String() if len(result) > 0 { - result = result[:len(result)-2] + result = result[:len(result)-1] } response := &pb.BlastGetModelChannelsResponse{