Skip to content

Commit d4423a0

Browse files
committed
sim-cli/fix: re-add doc for create_simulation_with_network
This was mistakenly omitted while rebasing
1 parent 8592ce2 commit d4423a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sim-cli/src/parsing.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,16 @@ struct NodeMapping {
242242
alias_node_map: HashMap<String, NodeInfo>,
243243
}
244244

245+
/// Creates a simulation that will run on an entirely-simulated network defined in `sim_params`,
246+
/// returning the simulation, a validated vector of any defined activities that were specified and
247+
/// a map of all the simulated nodes in the network. Note that if `sim_params::exclude` was set,
248+
/// the nodes will be excluded from the set of nodes actively sending/receiving random payments,
249+
/// but they will be included in the map so that they are available for use outside of the
250+
/// simulation.
251+
///
252+
/// This network can be customized by providing `interceptors` that will act on every HTLC that is
253+
/// forwarded by the network, and setting `custom_records` which will be set as the default TLV
254+
/// records set by the original sender of payments in their simulated `update_add_htlc`.
245255
pub async fn create_simulation_with_network<P: PathFinder + Clone + 'static>(
246256
cfg: SimulationCfg,
247257
sim_params: &SimParams,

0 commit comments

Comments
 (0)