Skip to content

Commit

Permalink
Initial commit for the cln-model
Browse files Browse the repository at this point in the history
  • Loading branch information
bjohnson5 committed Nov 14, 2024
1 parent c783ab2 commit b7ee9a7
Show file tree
Hide file tree
Showing 10 changed files with 575 additions and 4 deletions.
2 changes: 1 addition & 1 deletion blast_core/src/blast_simln_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ impl BlastSimLnManager {
for n in &self.data.nodes {
let id = match n {
NodeConnection::LND(c) => c.id.to_string(),
NodeConnection::CLN(_) => String::from(""),
NodeConnection::CLN(c) => c.id.to_string(),
};
ids.push(id);
}
Expand Down
3 changes: 3 additions & 0 deletions blast_models/blast_cln/blast_cln/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target
blast_data
Cargo.lock
21 changes: 21 additions & 0 deletions blast_models/blast_cln/blast_cln/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "blast_cln"
version = "0.1.0"
edition = "2021"

[dependencies]
tonic = { version = "0.12.3", features = ["tls"] }
tokio = { version = "1.37.0", features = ["full"] }
prost = "0.13.3"
serde = { version = "1.0.104", features = ["derive"] }
serde_json = "1.0.104"
secp256k1 = "0.29.1"
hex = "0.4.3"
simplelog = "0.12.2"
log = "0.4.20"
tar = "0.4"
flate2 = "1.0"

[build-dependencies]
tonic-build = "0.12.3"
prost-build = "0.13.3"
13 changes: 13 additions & 0 deletions blast_models/blast_cln/blast_cln/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use std::env;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut current_dir = env::current_dir()?;
current_dir.push("../../../blast_proto/blast_proto.proto");
let current_dir_string = current_dir.to_string_lossy().into_owned();
tonic_build::compile_protos(current_dir_string)?;

let mut config = prost_build::Config::new();
config.protoc_arg("--experimental_allow_proto3_optional");
tonic_build::configure().compile_protos_with_config(config, &["/home/lightning/cln-grpc/proto/node.proto"], &["/home/lightning/cln-grpc/proto"])?;

Ok(())
}
Loading

0 comments on commit b7ee9a7

Please sign in to comment.