File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
mithril-client/src/commands Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ impl RestoreCommand {
62
62
self . disable_digests_cache ,
63
63
self . reset_digests_cache ,
64
64
& config,
65
- ) ?,
65
+ )
66
+ . await ?,
66
67
slog_scope:: logger ( ) ,
67
68
) ) ;
68
69
let output = runtime
@@ -92,7 +93,7 @@ docker run -v cardano-node-ipc:/ipc -v cardano-node-data:/data --mount type=bind
92
93
}
93
94
}
94
95
95
- fn build_digester_cache_provider (
96
+ async fn build_digester_cache_provider (
96
97
disable_digests_cache : bool ,
97
98
reset_digests_cache : bool ,
98
99
config : & Config ,
@@ -119,9 +120,10 @@ fn build_digester_cache_provider(
119
120
}
120
121
121
122
let cache_file = cache_dir. join ( format ! ( "immutables_digests_{}.json" , config. network) ) ;
123
+ let cache_provider = Arc :: new ( JsonImmutableFileDigestCacheProvider :: new ( & cache_file) ) ;
122
124
123
125
if reset_digests_cache {
124
- fs :: remove_file ( & cache_file ) . map_err ( |e| {
126
+ cache_provider . reset ( ) . await . map_err ( |e| {
125
127
format ! (
126
128
"Failure when resetting digests cache file `{}`: {}" ,
127
129
cache_file. display( ) ,
@@ -134,9 +136,7 @@ fn build_digester_cache_provider(
134
136
"Storing/Getting immutables digests cache from: {}" ,
135
137
cache_file. display( )
136
138
) ;
137
- Ok ( Some ( Arc :: new ( JsonImmutableFileDigestCacheProvider :: new (
138
- & cache_file,
139
- ) ) ) )
139
+ Ok ( Some ( cache_provider) )
140
140
}
141
141
}
142
142
}
You can’t perform that action at this time.
0 commit comments