File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
.changelog/unreleased/bug-fixes Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1+ - Respect --wasm-dir on init-network.
2+ ([ \# 3432] ( https://github.com/anoma/namada/pull/3432 ) )
Original file line number Diff line number Diff line change @@ -766,7 +766,7 @@ impl CliApi {
766766 utils:: validate_wasm ( args)
767767 }
768768 ClientUtils :: InitNetwork ( InitNetwork ( args) ) => {
769- utils:: init_network ( args) ;
769+ utils:: init_network ( global_args , args) ;
770770 }
771771 ClientUtils :: GenesisBond ( GenesisBond ( args) ) => {
772772 utils:: genesis_bond ( args)
Original file line number Diff line number Diff line change @@ -301,6 +301,7 @@ pub fn id_from_pk(pk: &common::PublicKey) -> TendermintNodeId {
301301
302302/// Initialize a new test network from the given configuration.
303303pub fn init_network (
304+ global_args : args:: Global ,
304305 args:: InitNetwork {
305306 templates_path,
306307 wasm_checksums_path,
@@ -393,9 +394,11 @@ pub fn init_network(
393394 // Try to copy the built WASM, if they're present with the checksums
394395 let checksums = wasm_loader:: Checksums :: read_checksums ( & wasm_dir_full)
395396 . unwrap_or_else ( |_| safe_exit ( 1 ) ) ;
396- let base_wasm_path = std:: env:: current_dir ( )
397- . unwrap ( )
398- . join ( crate :: config:: DEFAULT_WASM_DIR ) ;
397+ let base_wasm_path = global_args. wasm_dir . unwrap_or_else ( || {
398+ std:: env:: current_dir ( )
399+ . unwrap ( )
400+ . join ( crate :: config:: DEFAULT_WASM_DIR )
401+ } ) ;
399402 for ( _, full_name) in checksums. 0 {
400403 // try to copy built file from the Namada WASM root dir
401404 let file = base_wasm_path. join ( & full_name) ;
Original file line number Diff line number Diff line change @@ -94,15 +94,17 @@ pub fn initialize_genesis(
9494 } ;
9595
9696 // Create genesis chain release archive
97- let release_archive_path =
98- namada_apps_lib:: client:: utils:: init_network ( args:: InitNetwork {
97+ let release_archive_path = namada_apps_lib:: client:: utils:: init_network (
98+ global_args. clone ( ) ,
99+ args:: InitNetwork {
99100 templates_path : genesis_path,
100101 wasm_checksums_path,
101102 chain_id_prefix,
102103 consensus_timeout_commit : Timeout :: from_str ( "30s" ) . unwrap ( ) ,
103104 archive_dir : None ,
104105 genesis_time,
105- } ) ;
106+ } ,
107+ ) ;
106108
107109 // Decode and unpack the release archive
108110 let mut archive = {
You can’t perform that action at this time.
0 commit comments