Skip to content

Commit 46a5125

Browse files
sangbidachuksys
authored andcommitted
Fix formatting
1 parent a6e7c87 commit 46a5125

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

sim-cli/src/parsing.rs

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,8 @@ use log::LevelFilter;
55
use serde::{Deserialize, Serialize};
66
use simln_lib::clock::SimulationClock;
77
use simln_lib::sim_node::{
8-
<<<<<<< HEAD
98
ln_node_from_graph, populate_network_graph, ChannelPolicy, CustomRecords, Interceptor,
10-
SimGraph, SimNode, SimulatedChannel,
11-
=======
12-
ln_node_from_graph, populate_network_graph, ChannelPolicy, CustomRecords, Interceptor, PathFinder,
13-
SimGraph, SimulatedChannel,
14-
>>>>>>> 59dbbe6 (Add pathfinder trait)
9+
PathFinder, SimGraph, SimulatedChannel,
1510
};
1611

1712
use simln_lib::{
@@ -247,29 +242,15 @@ struct NodeMapping {
247242
alias_node_map: HashMap<String, NodeInfo>,
248243
}
249244

250-
<<<<<<< HEAD
251-
/// Creates a simulation that will run on an entirely-simulated network defined in `sim_params`,
252-
/// returning the simulation, a validated vector of any defined activities that were specified and
253-
/// a map of all the simulated nodes in the network. Note that if `sim_params::exclude` was set,
254-
/// the nodes will be excluded from the set of nodes actively sending/receiving random payments,
255-
/// but they will be included in the map so that they are available for use outside of the
256-
/// simulation.
257-
///
258-
/// This network can be customized by providing `interceptors` that will act on every HTLC that is
259-
/// forwarded by the network, and setting `custom_records` which will be set as the default TLV
260-
/// records set by the original sender of payments in their simulated `update_add_htlc`.
261-
pub async fn create_simulation_with_network(
262-
cfg: SimulationCfg,
263-
=======
264-
pub async fn create_simulation_with_network<P: for<'a> PathFinder<'a> + Clone + 'static>(
245+
pub async fn create_simulation_with_network<P: PathFinder + Clone + 'static>(
265246
cli: &Cli,
266-
>>>>>>> 59dbbe6 (Add pathfinder trait)
267247
sim_params: &SimParams,
268248
clock: Arc<SimulationClock>,
269249
tasks: TaskTracker,
270250
interceptors: Vec<Arc<dyn Interceptor>>,
271251
custom_records: CustomRecords,
272252
<<<<<<< HEAD
253+
<<<<<<< HEAD
273254
) -> Result<
274255
(
275256
Simulation<SimulationClock>,
@@ -279,10 +260,11 @@ pub async fn create_simulation_with_network<P: for<'a> PathFinder<'a> + Clone +
279260
anyhow::Error,
280261
> {
281262
=======
263+
=======
264+
>>>>>>> 079041b (Fix formatting)
282265
pathfinder: P,
283266
) -> Result<(Simulation<SimulationClock>, Vec<ActivityDefinition>), anyhow::Error> {
284267
let cfg: SimulationCfg = SimulationCfg::try_from(cli)?;
285-
>>>>>>> 59dbbe6 (Add pathfinder trait)
286268
let SimParams {
287269
nodes: _,
288270
sim_network,
@@ -326,6 +308,7 @@ pub async fn create_simulation_with_network<P: for<'a> PathFinder<'a> + Clone +
326308
.map_err(|e| SimulationError::SimulatedNetworkError(format!("{:?}", e)))?,
327309
);
328310

311+
<<<<<<< HEAD
329312
<<<<<<< HEAD
330313
// We want the full set of nodes in our graph to return to the caller so that they can take
331314
// custom actions on the simulated network. For the nodes we'll pass our simulation, cast them
@@ -341,9 +324,10 @@ pub async fn create_simulation_with_network<P: for<'a> PathFinder<'a> + Clone +
341324
}
342325

343326
=======
327+
=======
328+
>>>>>>> 079041b (Fix formatting)
344329
// Pass the pathfinder to ln_node_from_graph
345330
let nodes = ln_node_from_graph(simulation_graph.clone(), routing_graph, pathfinder).await;
346-
>>>>>>> 59dbbe6 (Add pathfinder trait)
347331
let validated_activities =
348332
get_validated_activities(&nodes_dyn, nodes_info, sim_params.activity.clone()).await?;
349333

0 commit comments

Comments
 (0)