File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1818
1919use crate :: { InitConfig , RawDatabase , database:: BlockSmallData , migrations:: v1} ;
2020use anyhow:: { Context , Result } ;
21- use ethexe_common:: db:: BlockMeta ;
21+ use ethexe_common:: db:: { BlockMeta , DBConfig } ;
2222use gprimitives:: H256 ;
2323use parity_scale_codec:: { Decode , Encode } ;
2424
@@ -59,6 +59,11 @@ pub async fn migration_from_v1(_config: &InitConfig, db: &RawDatabase) -> Result
5959 } ;
6060
6161 db. kv . put ( & block_small_data_key, small_data. encode ( ) ) ;
62+
63+ db. kv . set_config ( DBConfig {
64+ version : VERSION ,
65+ ..db. kv . config ( ) ?
66+ } ) ;
6267 }
6368
6469 Ok ( ( ) )
@@ -68,6 +73,7 @@ pub async fn migration_from_v1(_config: &InitConfig, db: &RawDatabase) -> Result
6873mod tests {
6974 use super :: * ;
7075 use crate :: migrations:: test:: assert_migration_types_hash;
76+ use ethexe_common:: db:: DBConfig ;
7177 use scale_info:: meta_type;
7278
7379 #[ test]
@@ -77,6 +83,7 @@ mod tests {
7783 vec ! [
7884 meta_type:: <v1:: BlockSmallData >( ) ,
7985 meta_type:: <BlockSmallData >( ) ,
86+ meta_type:: <DBConfig >( ) ,
8087 ] ,
8188 "3177a0fb8ad47482d0ab5d4898b2fa6702730fe3e77fffcd24ab0901d6a5413d" ,
8289 ) ;
You can’t perform that action at this time.
0 commit comments