Skip to content

Commit c2d42b9

Browse files
committed
adding comment
1 parent 6d61bed commit c2d42b9

File tree

1 file changed

+6
-0
lines changed
  • src/jormungandr/testing/jormungandr-automation/src/jormungandr/starter/params

1 file changed

+6
-0
lines changed

src/jormungandr/testing/jormungandr-automation/src/jormungandr/starter/params/builder.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ impl Default for JormungandrBootstrapper {
4545
}
4646

4747
impl JormungandrBootstrapper {
48+
49+
//This function is meant to be used instead of JormungandrBootstrapper::default().with_node_config(node_config)
50+
//This is because the Default trait for JormungandrBootstrapper instanciates a NodeConfig struct that will be overwritten
51+
//by the NodeConfig passed by the .with_node_config() function. NodeConfig calls the function get_available_port()
52+
//that makes operations on an Atomic variable and "flags" some ports as being used, both operations that would
53+
//be better to not duplicate for performance and debbugging reasons.
4854
pub fn default_with_config(node_config: NodeConfig) -> Self {
4955
Self {
5056
node_config: Box::new(NodeConfigManager {

0 commit comments

Comments
 (0)