mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-17 07:45:41 +00:00
parachain-system: Send same event & digest as a standalone chain (#2064)
This ensures that upgrading a parachain code sends the same event & digest as when using `set_code` on a standalone chain. Close: https://github.com/paritytech/polkadot-sdk/issues/2049
This commit is contained in:
@@ -869,7 +869,7 @@ fn hrmp_outbound_respects_used_bandwidth() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn events() {
|
||||
fn runtime_upgrade_events() {
|
||||
BlockTests::new()
|
||||
.with_relay_sproof_builder(|_, block_number, builder| {
|
||||
if block_number > 123 {
|
||||
@@ -894,12 +894,20 @@ fn events() {
|
||||
|| {},
|
||||
|| {
|
||||
let events = System::events();
|
||||
|
||||
assert_eq!(events[0].event, RuntimeEvent::System(frame_system::Event::CodeUpdated));
|
||||
|
||||
assert_eq!(
|
||||
events[0].event,
|
||||
events[1].event,
|
||||
RuntimeEvent::ParachainSystem(crate::Event::ValidationFunctionApplied {
|
||||
relay_chain_block_num: 1234
|
||||
})
|
||||
);
|
||||
|
||||
assert!(System::digest()
|
||||
.logs()
|
||||
.iter()
|
||||
.any(|d| *d == sp_runtime::generic::DigestItem::RuntimeEnvironmentUpdated));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user