Skip to content

Commit

Permalink
Ensure to use the default value of RuntimeGenesisConfig for benchmark
Browse files Browse the repository at this point in the history
Signed-off-by: linning <[email protected]>
  • Loading branch information
NingLin-P committed Oct 29, 2024
1 parent 3bc9fdb commit 1d79703
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/subspace-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1534,8 +1534,9 @@ impl_runtime_apis! {
build_state::<RuntimeGenesisConfig>(config)
}

fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
get_preset::<RuntimeGenesisConfig>(id, |_| None)
fn get_preset(_id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
// By passing `None` the upstream `get_preset` will return the default value of `RuntimeGenesisConfig`
get_preset::<RuntimeGenesisConfig>(&None, |_| None)
}

fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
Expand Down

0 comments on commit 1d79703

Please sign in to comment.