diff --git a/polkadot/xcm/xcm-builder/src/tests/origins.rs b/polkadot/xcm/xcm-builder/src/tests/origins.rs index b6a1a9f1052a4..3cdc0a8eb36c2 100644 --- a/polkadot/xcm/xcm-builder/src/tests/origins.rs +++ b/polkadot/xcm/xcm-builder/src/tests/origins.rs @@ -139,7 +139,10 @@ fn unpaid_execution_should_work() { Weight::from_parts(50, 50), Weight::zero(), ); - assert_eq!(r, Outcome::Error { error: XcmError::Barrier }); + assert_eq!( + r, + Outcome::Incomplete { used: Weight::from_parts(10, 10), error: XcmError::Barrier } + ); let message = Xcm(vec![UnpaidExecution { weight_limit: Limited(Weight::from_parts(10, 10)), diff --git a/polkadot/xcm/xcm-builder/src/tests/querying.rs b/polkadot/xcm/xcm-builder/src/tests/querying.rs index 3b47073d53df1..062b508368f77 100644 --- a/polkadot/xcm/xcm-builder/src/tests/querying.rs +++ b/polkadot/xcm/xcm-builder/src/tests/querying.rs @@ -130,5 +130,8 @@ fn prepaid_result_of_query_should_get_free_execution() { weight_limit, Weight::zero(), ); - assert_eq!(r, Outcome::Error { error: XcmError::Barrier }); + assert_eq!( + r, + Outcome::Incomplete { used: Weight::from_parts(10, 10), error: XcmError::Barrier } + ); } diff --git a/polkadot/xcm/xcm-builder/src/tests/version_subscriptions.rs b/polkadot/xcm/xcm-builder/src/tests/version_subscriptions.rs index 01047fde989f9..df36b3c573106 100644 --- a/polkadot/xcm/xcm-builder/src/tests/version_subscriptions.rs +++ b/polkadot/xcm/xcm-builder/src/tests/version_subscriptions.rs @@ -37,7 +37,7 @@ fn simple_version_subscriptions_should_work() { weight_limit, Weight::zero(), ), - Outcome::Error { error: XcmError::Barrier } + Outcome::Incomplete { used: Weight::from_parts(20, 20), error: XcmError::Barrier } ); // this case fails because the additional `SetAppendix` instruction is not allowed in the @@ -50,7 +50,7 @@ fn simple_version_subscriptions_should_work() { weight_limit, Weight::zero(), ), - Outcome::Error { error: XcmError::Barrier } + Outcome::Incomplete { used: Weight::from_parts(20, 20), error: XcmError::Barrier } ); let message = Xcm::(vec![SubscribeVersion { @@ -66,7 +66,10 @@ fn simple_version_subscriptions_should_work() { weight_limit, Weight::zero(), ); - assert_eq!(r, Outcome::Error { error: XcmError::Barrier }); + assert_eq!( + r, + Outcome::Incomplete { used: Weight::from_parts(10, 10), error: XcmError::Barrier } + ); let r = XcmExecutor::::prepare_and_execute( Parent, @@ -139,7 +142,10 @@ fn simple_version_unsubscriptions_should_work() { weight_limit, Weight::zero(), ); - assert_eq!(r, Outcome::Error { error: XcmError::Barrier }); + assert_eq!( + r, + Outcome::Incomplete { used: Weight::from_parts(20, 20), error: XcmError::Barrier } + ); let origin = Parachain(1000); let message = Xcm::(vec![UnsubscribeVersion]); @@ -152,7 +158,10 @@ fn simple_version_unsubscriptions_should_work() { weight_limit, Weight::zero(), ); - assert_eq!(r, Outcome::Error { error: XcmError::Barrier }); + assert_eq!( + r, + Outcome::Incomplete { used: Weight::from_parts(10, 10), error: XcmError::Barrier } + ); let r = XcmExecutor::::prepare_and_execute( Parent, diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index f0f2e3154a8fc..d5b7408c40e7e 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -243,7 +243,11 @@ impl ExecuteXcm for XcmExecutor