Currently we write a separate genesis function for each Parachain when creating the emulated test environments cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs.
Much of this logic is repeated, but some is chain / environment specific. We can make a generic function, reducing code repetition and making this code more expressive.
Currently we write a separate
genesis
function for each Parachain when creating the emulated test environmentscumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/src/genesis.rs
. Much of this logic is repeated, but some is chain / environment specific. We can make a generic function, reducing code repetition and making this code more expressive.We could do something like
Then we could do a
impl RuntimeConfigurator for BridgeHubRococoRuntime
, for example.And finally:
Originally suggested here by @liamaharon