paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.63k stars 573 forks source link

[xcm-emulator] Investigate (and fix) `assert_xcm_pallet_sent` #1127

Open bkontur opened 10 months ago

bkontur commented 10 months ago

I found invalid assert here: https://github.com/paritytech/cumulus/pull/3031/files#diff-632bfe4dfbc88d50679041b9429cd988801a73145e23d4dd79b464e8ef3f4c75L174-R174

PenpalKusamaA sends xcm but assertion was done for AssetHubKusama::assert_xcm_pallet_sent(); ?

I changed those asserts: https://github.com/paritytech/cumulus/pull/3031 so PenpalKusamaA sends xcm and assertion is done for PenpalKusamaA::assert_xcm_pallet_sent();,

but the tests still works :)

so I think that AssetHubKusama::assert_xcm_pallet_sent(); is not checking for AssetHubKusama specific events, but checks "any" events

NachoPal commented 10 months ago

The reason why it is happening is because the event pattern matching still works when selecting a different chain.

https://github.com/paritytech/polkadot-sdk/issues/1388#issuecomment-1705030230