@@ -70,12 +70,12 @@ def _generate_rippled_configs(config_dir: str) -> Tuple[int, int]:
7070 """
7171 locking_ports = Ports .generate (0 )
7272 _generate_standalone_config (
73- ports = locking_ports , cfg_type = "mainchain " , config_dir = config_dir
73+ ports = locking_ports , cfg_type = "locking_chain " , config_dir = config_dir
7474 )
7575
7676 issuing_ports = Ports .generate (1 )
7777 _generate_standalone_config (
78- ports = issuing_ports , cfg_type = "sidechain " , config_dir = config_dir
78+ ports = issuing_ports , cfg_type = "issuing_chain " , config_dir = config_dir
7979 )
8080
8181 return locking_ports .ws_public_port , issuing_ports .ws_public_port
@@ -96,19 +96,19 @@ def _generate_rippled_configs(config_dir: str) -> Tuple[int, int]:
9696)
9797@click .option (
9898 "--mc_port" ,
99- "mainchain_port " ,
99+ "locking_chain_port " ,
100100 required = True ,
101101 prompt = True ,
102102 type = int ,
103- help = "The port used by the mainchain ." ,
103+ help = "The port used by the locking chain ." ,
104104)
105105@click .option (
106106 "--sc_port" ,
107- "sidechain_port " ,
107+ "issuing_chain_port " ,
108108 required = True ,
109109 prompt = True ,
110110 type = int ,
111- help = "The port used by the sidechain ." ,
111+ help = "The port used by the issuing chain ." ,
112112)
113113@click .option (
114114 "--witness_port" ,
@@ -146,8 +146,8 @@ def _generate_rippled_configs(config_dir: str) -> Tuple[int, int]:
146146def generate_witness_config (
147147 config_dir : str ,
148148 name : str ,
149- mainchain_port : int ,
150- sidechain_port : int ,
149+ locking_chain_port : int ,
150+ issuing_chain_port : int ,
151151 witness_port : int ,
152152 locking_reward_seed : str ,
153153 locking_reward_account : str ,
@@ -163,8 +163,8 @@ def generate_witness_config(
163163 Args:
164164 config_dir: The folder in which to store config files.
165165 name: The name of the witness server.
166- mainchain_port : The port used by the mainchain .
167- sidechain_port : The port used by the sidechain .
166+ locking_chain_port : The port used by the locking chain .
167+ issuing_chain_port : The port used by the issuing chain .
168168 witness_port: The port that will be used by the witness server.
169169 src_door: The door account on the source chain.
170170 dst_door: The door account on the destination chain. Defaults to the genesis
@@ -181,8 +181,8 @@ def generate_witness_config(
181181 Path (sub_dir + path ).mkdir (parents = True , exist_ok = True )
182182
183183 template_data = {
184- "mainchain_port " : mainchain_port ,
185- "sidechain_port " : sidechain_port ,
184+ "locking_chain_port " : locking_chain_port ,
185+ "issuing_chain_port " : issuing_chain_port ,
186186 "witness_port" : witness_port ,
187187 "db_dir" : f"{ sub_dir } /db" ,
188188 "seed" : Wallet .create (CryptoAlgorithm .SECP256K1 ).seed ,
@@ -213,16 +213,16 @@ def generate_witness_config(
213213)
214214@click .option (
215215 "--mc_seed" ,
216- "mainchain_seed " ,
216+ "locking_chain_seed " ,
217217 required = True ,
218218 prompt = True ,
219- help = "The seed of the mainchain door account." ,
219+ help = "The seed of the locking chain door account." ,
220220)
221221@click .option (
222222 "--sc_seed" ,
223- "sidechain_seed " ,
223+ "issuing_chain_seed " ,
224224 default = "snoPBrXtMeMyMHUVTgbuqAfg1SUTb" ,
225- help = "The seed of the sidechain door account. Defaults to the genesis account." ,
225+ help = "The seed of the issuing chain door account. Defaults to the genesis account." ,
226226)
227227@click .option (
228228 "--reward_account" ,
@@ -237,8 +237,8 @@ def generate_witness_config(
237237)
238238def generate_bootstrap (
239239 config_dir : str ,
240- mainchain_seed : str ,
241- sidechain_seed : str ,
240+ locking_chain_seed : str ,
241+ issuing_chain_seed : str ,
242242 reward_accounts : List [str ],
243243 verbose : bool = False ,
244244) -> None :
@@ -247,20 +247,20 @@ def generate_bootstrap(
247247
248248 Args:
249249 config_dir: The folder in which to store config files.
250- mainchain_seed : The seed of the mainchain door account.
251- sidechain_seed : The seed of the sidechain door account. Defaults to the genesis
252- account.
250+ locking_chain_seed : The seed of the locking_chain door account.
251+ issuing_chain_seed : The seed of the issuing_chain door account. Defaults to the
252+ genesis account.
253253 reward_accounts: The witness reward accounts (which need to be created).
254254 verbose: Whether or not to print more verbose information.
255255 """
256- mainchain_door = Wallet (mainchain_seed , 0 )
257- sidechain_door = Wallet (sidechain_seed , 0 )
256+ locking_chain_door = Wallet (locking_chain_seed , 0 )
257+ issuing_chain_door = Wallet (issuing_chain_seed , 0 )
258258
259259 template_data = {
260- "mainchain_id " : mainchain_door .classic_address ,
261- "mainchain_seed " : mainchain_door .seed ,
262- "sidechain_id " : sidechain_door .classic_address ,
263- "sidechain_seed " : sidechain_door .seed ,
260+ "locking_chain_id " : locking_chain_door .classic_address ,
261+ "locking_chain_seed " : locking_chain_door .seed ,
262+ "issuing_chain_id " : issuing_chain_door .classic_address ,
263+ "issuing_chain_seed " : issuing_chain_door .seed ,
264264 "witness_reward_accounts" : reward_accounts ,
265265 }
266266 if verbose :
@@ -319,8 +319,8 @@ def generate_all_configs(
319319 generate_witness_config ,
320320 config_dir = abs_config_dir ,
321321 name = f"witness{ i } " ,
322- mainchain_port = mc_port ,
323- sidechain_port = sc_port ,
322+ locking_chain_port = mc_port ,
323+ issuing_chain_port = sc_port ,
324324 witness_port = 6010 + i ,
325325 src_door = src_door .classic_address ,
326326 locking_reward_seed = witness_reward_wallet .seed ,
@@ -331,7 +331,7 @@ def generate_all_configs(
331331 ctx .invoke (
332332 generate_bootstrap ,
333333 config_dir = abs_config_dir ,
334- mainchain_seed = src_door .seed ,
334+ locking_chain_seed = src_door .seed ,
335335 verbose = verbose ,
336336 reward_accounts = reward_accounts ,
337337 )
0 commit comments