File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
node/service/src/chain_spec Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,28 @@ pub fn load_frequency_spec() -> ChainSpec {
16
16
. unwrap ( )
17
17
}
18
18
19
+ #[ allow( clippy:: unwrap_used) ]
20
+ fn frequency_genesis_config ( ) -> serde_json:: Value {
21
+ let mut output: serde_json:: Value =
22
+ serde_json:: from_slice ( include_bytes ! ( "../../../../resources/frequency.json" ) . as_slice ( ) )
23
+ . map_err ( |e| format ! ( "Invalid JSON blob {:?}" , e) )
24
+ . unwrap ( ) ;
25
+
26
+ if let Some ( runtime) = output[ "genesis" ] [ "runtime" ] . as_object_mut ( ) {
27
+ runtime. remove ( "vesting" ) ;
28
+ runtime[ "parachainSystem" ] = serde_json:: json!( { } ) ;
29
+ runtime[ "treasury" ] = serde_json:: json!( { } ) ;
30
+ runtime[ "auraExt" ] = serde_json:: json!( { } ) ;
31
+ }
32
+
33
+ if let Some ( system) = output[ "genesis" ] [ "runtime" ] [ "system" ] . as_object_mut ( ) {
34
+ system. remove ( "code" ) ;
35
+ }
36
+
37
+ let runtime = & output[ "genesis" ] [ "runtime" ] ;
38
+ runtime. clone ( )
39
+ }
40
+
19
41
#[ allow( clippy:: unwrap_used) ]
20
42
pub fn benchmark_mainnet_config ( ) -> ChainSpec {
21
43
let properties =
@@ -38,6 +60,6 @@ pub fn benchmark_mainnet_config() -> ChainSpec {
38
60
"/dns4/0.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWBd4aEArNvXECtt2JHQACBdFmeafpyfre3q81iM1xCcpP" . parse( ) . unwrap( ) ,
39
61
"/dns4/1.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWCW8d7Yz2d3Jcb49rWcNppRNEs1K2NZitCpPtrHSQb6dw" . parse( ) . unwrap( ) ,
40
62
] )
41
- . with_genesis_config_preset_name ( "frequency" )
63
+ . with_genesis_config_patch ( frequency_genesis_config ( ) )
42
64
. build ( )
43
65
}
You can’t perform that action at this time.
0 commit comments