Skip to content

Commit 8738155

Browse files
committed
simln-lib: add htlc Interceptor trait to simulated node
1 parent bb07809 commit 8738155

File tree

4 files changed

+610
-74
lines changed

4 files changed

+610
-74
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sim-cli/src/parsing.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,13 @@ pub async fn create_simulation_with_network(
243243

244244
// Setup a simulation graph that will handle propagation of payments through the network
245245
let simulation_graph = Arc::new(Mutex::new(
246-
SimGraph::new(channels.clone(), tasks.clone(), shutdown_trigger.clone())
247-
.map_err(|e| SimulationError::SimulatedNetworkError(format!("{:?}", e)))?,
246+
SimGraph::new(
247+
channels.clone(),
248+
tasks.clone(),
249+
vec![],
250+
(shutdown_trigger.clone(), shutdown_listener.clone()),
251+
)
252+
.map_err(|e| SimulationError::SimulatedNetworkError(format!("{:?}", e)))?,
248253
));
249254

250255
let clock = Arc::new(SimulationClock::new(cli.speedup_clock.unwrap_or(1))?);

simln-lib/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ tokio-util = { version = "0.7.13", features = ["rt"] }
3636

3737
[dev-dependencies]
3838
ntest = "0.9.0"
39-
mockall = "0.13.1"
39+
mockall = "0.13.1"
40+
futures = "0.3.31"

0 commit comments

Comments
 (0)