@@ -134,6 +134,10 @@ pub fn log_download_information(
134134 json_output : bool ,
135135 include_ancillary : bool ,
136136) -> MithrilResult < ( ) > {
137+ fn is_linux_arm ( ) -> bool {
138+ cfg ! ( target_os = "linux" ) && cfg ! ( target_arch = "aarch64" )
139+ }
140+
137141 let canonical_filepath = & db_dir
138142 . canonicalize ( )
139143 . with_context ( || format ! ( "Could not get canonical filepath of '{}'" , db_dir. display( ) ) ) ?;
@@ -155,53 +159,56 @@ pub fn log_download_information(
155159 } ;
156160
157161 if json_output {
158- let json = if include_ancillary {
159- serde_json :: json! ( {
160- "timestamp ": Utc :: now ( ) . to_rfc3339 ( ) ,
161- "db_directory" : canonical_filepath ,
162- "run_docker_cmd" : docker_cmd ,
163- "snapshot_converter_cmd_to_lmdb" : snapshot_converter_cmd ( "LMDB" ) ,
164- "snapshot_converter_cmd_to_legacy" : snapshot_converter_cmd ( "Legacy" )
165- } )
166- } else {
167- serde_json :: json! ( {
168- "timestamp" : Utc :: now ( ) . to_rfc3339 ( ) ,
169- "db_directory" : canonical_filepath ,
170- "run_docker_cmd" : docker_cmd
171- } )
172- } ;
162+ let mut json = serde_json :: json! ( {
163+ "timestamp" : Utc :: now ( ) . to_rfc3339 ( ) ,
164+ "db_directory ": canonical_filepath ,
165+ } ) ;
166+
167+ if ! is_linux_arm ( ) {
168+ json [ "run_docker_cmd" ] = serde_json :: Value :: String ( docker_cmd ) ;
169+
170+ if include_ancillary {
171+ json[ "snapshot_converter_cmd_to_lmdb" ] =
172+ serde_json :: Value :: String ( snapshot_converter_cmd ( "LMDB" ) ) ;
173+ json [ "snapshot_converter_cmd_to_legacy" ] =
174+ serde_json :: Value :: String ( snapshot_converter_cmd ( "Legacy" ) ) ;
175+ }
176+ }
173177
174178 println ! ( "{json}" ) ;
175179 } else {
176180 println ! (
177181 r###"Cardano database snapshot '{}' archives have been successfully unpacked. Immutable files have been successfully verified with Mithril.
178182
179183 Files in the directory '{}' can be used to run a Cardano node with version >= {cardano_node_version}.
180-
181- If you are using Cardano Docker image, you can restore a Cardano Node with:
182-
183- {}
184-
185184 "### ,
186185 snapshot_hash,
187- db_dir. display( ) ,
188- docker_cmd
186+ db_dir. display( )
189187 ) ;
190188
191- if include_ancillary {
189+ if ! is_linux_arm ( ) {
192190 println ! (
193- r###"Upgrade and replace the restored ledger state snapshot to 'LMDB' flavor by running the command:
191+ r###"If you are using the Cardano Docker image, you can restore a Cardano node with:
192+
193+ {docker_cmd}
194+
195+ "###
196+ ) ;
197+
198+ if include_ancillary {
199+ println ! (
200+ r###"Upgrade and replace the restored ledger state snapshot to 'LMDB' flavor by running the command:
194201
195202 {}
196203
197204 Or to 'Legacy' flavor by running the command:
198205
199206 {}
200-
201207 "### ,
202- snapshot_converter_cmd( "LMDB" ) ,
203- snapshot_converter_cmd( "Legacy" ) ,
204- ) ;
208+ snapshot_converter_cmd( "LMDB" ) ,
209+ snapshot_converter_cmd( "Legacy" ) ,
210+ ) ;
211+ }
205212 }
206213 }
207214
0 commit comments