@@ -134,6 +134,10 @@ pub fn log_download_information(
134
134
json_output : bool ,
135
135
include_ancillary : bool ,
136
136
) -> MithrilResult < ( ) > {
137
+ fn is_linux_arm ( ) -> bool {
138
+ cfg ! ( target_os = "linux" ) && cfg ! ( target_arch = "aarch64" )
139
+ }
140
+
137
141
let canonical_filepath = & db_dir
138
142
. canonicalize ( )
139
143
. with_context ( || format ! ( "Could not get canonical filepath of '{}'" , db_dir. display( ) ) ) ?;
@@ -155,53 +159,56 @@ pub fn log_download_information(
155
159
} ;
156
160
157
161
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
+ }
173
177
174
178
println ! ( "{json}" ) ;
175
179
} else {
176
180
println ! (
177
181
r###"Cardano database snapshot '{}' archives have been successfully unpacked. Immutable files have been successfully verified with Mithril.
178
182
179
183
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
-
185
184
"### ,
186
185
snapshot_hash,
187
- db_dir. display( ) ,
188
- docker_cmd
186
+ db_dir. display( )
189
187
) ;
190
188
191
- if include_ancillary {
189
+ if ! is_linux_arm ( ) {
192
190
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:
194
201
195
202
{}
196
203
197
204
Or to 'Legacy' flavor by running the command:
198
205
199
206
{}
200
-
201
207
"### ,
202
- snapshot_converter_cmd( "LMDB" ) ,
203
- snapshot_converter_cmd( "Legacy" ) ,
204
- ) ;
208
+ snapshot_converter_cmd( "LMDB" ) ,
209
+ snapshot_converter_cmd( "Legacy" ) ,
210
+ ) ;
211
+ }
205
212
}
206
213
}
207
214
0 commit comments