mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Do not use Option to wrap GenesisConfig fields (#8275)
Currently we wrap every `GenesisConfig` field in an `Option`, while we require `Default` being implemented for all pallet genesisconfigs. Passing `None` also results in the genesis not being initialized, which is a bug as seen from the perspective of a pallet developer? This pr changes the fields of the `GenesisConfig` to non `Option` types.
This commit is contained in:
@@ -814,14 +814,14 @@ mod tests {
|
||||
pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
let t = GenesisConfig {
|
||||
// We use default for brevity, but you can configure as desired if needed.
|
||||
frame_system: Some(Default::default()),
|
||||
pallet_balances: Some(Default::default()),
|
||||
pallet_example: Some(pallet_example::GenesisConfig {
|
||||
frame_system: Default::default(),
|
||||
pallet_balances: Default::default(),
|
||||
pallet_example: pallet_example::GenesisConfig {
|
||||
dummy: 42,
|
||||
// we configure the map with (key, value) pairs.
|
||||
bar: vec![(1, 2), (2, 3)],
|
||||
foo: 24,
|
||||
}),
|
||||
},
|
||||
}.build_storage().unwrap();
|
||||
t.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user