-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[xcm-emulator] Add on_initialize
and on_finalize
hooks
#1384
Comments
Picking this up |
@0xmovses Ok, I had something in mind already. The idea is to expand decl_test_parachains! {
pub struct AssetHub {
genesis = genesis(),
on_genesis = {
asset_hub_kusama_runtime::AuraExt::on_initialize(1);
},
runtime = asset_hub_kusama_runtime,
core = {
XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue,
DmpMessageHandler: asset_hub_kusama_runtime::DmpQueue,
LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId,
ParachainInfo: asset_hub_kusama_runtime::ParachainInfo,
},
pallets = {
PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm,
Assets: asset_hub_kusama_runtime::Assets,
ForeignAssets: asset_hub_kusama_runtime::ForeignAssets,
PoolAssets: asset_hub_kusama_runtime::PoolAssets,
AssetConversion: asset_hub_kusama_runtime::AssetConversion,
Balances: asset_hub_kusama_runtime::Balances,
},
on_initialize = // Accepts a function that is expecting `BlockNumber` as argument
on_finalize = // Accepts a function that is expecting `BlockNumber` as argument,
},
} Maybe just |
Actually Inside the function, individual calls to each selected pallets For Parachains
The block numbers can be queried in
|
Hey, I would like to pick up on this issue for a reason:
as done in
This represents a problem for parachains that use a different type for block numbers, e.g. a |
More info here: paritytech/cumulus#2734
The text was updated successfully, but these errors were encountered: