File tree Expand file tree Collapse file tree 7 files changed +36
-22
lines changed
pallet/account-migration/src Expand file tree Collapse file tree 7 files changed +36
-22
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ edition = "2021"
1717homepage = " https://darwinia.network"
1818license = " GPL-3.0"
1919repository = " https://github.com/darwinia-network/darwinia"
20- version = " 6.8.1 "
20+ version = " 6.9.0 "
2121
2222[workspace .dependencies ]
2323# crates.io
Original file line number Diff line number Diff line change @@ -138,8 +138,7 @@ where
138138{
139139 let d = env:: current_exe ( ) . unwrap ( ) . parent ( ) . unwrap ( ) . to_path_buf ( ) ;
140140 let p = d. join ( name) ;
141-
142- if !p. is_file ( ) {
141+ let download = || {
143142 println ! ( "Downloading `{name}` to `{}`" , d. display( ) ) ;
144143
145144 thread:: spawn ( move || {
@@ -156,6 +155,21 @@ where
156155 } )
157156 . join ( )
158157 . unwrap ( ) ;
158+ } ;
159+
160+ if !p. is_file ( ) {
161+ download ( ) ;
162+ } else if let Ok ( metadata) = p. metadata ( ) {
163+ // Fetch the latest spec every 14 days.
164+ if let Ok ( date) = metadata. modified ( ) {
165+ if let Ok ( elapsed) = date. elapsed ( ) {
166+ if elapsed. as_secs ( ) > 60 * 60 * 24 * 14 {
167+ if fs:: remove_file ( p. clone ( ) ) . is_ok ( ) {
168+ download ( ) ;
169+ }
170+ }
171+ }
172+ }
159173 }
160174
161175 println ! ( "Loading genesis from `{}`" , p. display( ) ) ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
2828 spec_name : sp_runtime:: create_runtime_str!( "Darwinia2" ) ,
2929 impl_name : sp_runtime:: create_runtime_str!( "DarwiniaOfficialRust" ) ,
3030 authoring_version : 0 ,
31- spec_version : 6_8_1_0 ,
31+ spec_version : 6_9_0_0 ,
3232 impl_version : 0 ,
3333 apis : sp_version:: create_apis_vec!( [ ] ) ,
3434 transaction_version : 0 ,
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
8484 spec_name : sp_runtime:: create_runtime_str!( "Crab2" ) ,
8585 impl_name : sp_runtime:: create_runtime_str!( "DarwiniaOfficialRust" ) ,
8686 authoring_version : 0 ,
87- spec_version : 6_8_1_0 ,
87+ spec_version : 6_9_0_0 ,
8888 impl_version : 0 ,
8989 apis : RUNTIME_API_VERSIONS ,
9090 transaction_version : 0 ,
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
8484 spec_name : sp_runtime:: create_runtime_str!( "Darwinia2" ) ,
8585 impl_name : sp_runtime:: create_runtime_str!( "DarwiniaOfficialRust" ) ,
8686 authoring_version : 0 ,
87- spec_version : 6_8_1_0 ,
87+ spec_version : 6_9_0_0 ,
8888 impl_version : 0 ,
8989 apis : RUNTIME_API_VERSIONS ,
9090 transaction_version : 0 ,
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
8484 spec_name : sp_runtime:: create_runtime_str!( "Darwinia Koi" ) ,
8585 impl_name : sp_runtime:: create_runtime_str!( "DarwiniaOfficialRust" ) ,
8686 authoring_version : 0 ,
87- spec_version : 6_8_1_1 ,
87+ spec_version : 6_9_0_0 ,
8888 impl_version : 0 ,
8989 apis : RUNTIME_API_VERSIONS ,
9090 transaction_version : 0 ,
You can’t perform that action at this time.
0 commit comments