Remove dispatch_result field (#1660)

* remove dispatch_result field

* fix benchmarks
This commit is contained in:
Svyatoslav Nikolsky
2022-11-22 16:56:42 +03:00
committed by Bastian Köcher
parent 56d58d60da
commit 1688b493cd
16 changed files with 41 additions and 180 deletions
@@ -194,7 +194,6 @@ mod tests {
let max_incoming_inbound_lane_data_proof_size =
bp_messages::InboundLaneData::<()>::encoded_size_hint_u32(
bp_millau::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX as _,
bp_millau::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX as _,
);
pallet_bridge_messages::ensure_able_to_receive_confirmation::<Weights>(
bp_millau::Millau::max_extrinsic_size(),
@@ -317,7 +317,6 @@ mod tests {
assert_eq!(
dispatch_result,
MessageDispatchResult {
dispatch_result: true,
unspent_weight: frame_support::weights::Weight::from_ref_time(0),
dispatch_fee_paid_during_dispatch: false,
}
@@ -895,7 +895,6 @@ mod tests {
assert_eq!(
dispatch_result,
MessageDispatchResult {
dispatch_result: true,
unspent_weight: frame_support::weights::Weight::from_ref_time(0),
dispatch_fee_paid_during_dispatch: false,
}
@@ -192,7 +192,6 @@ mod tests {
let max_incoming_inbound_lane_data_proof_size =
bp_messages::InboundLaneData::<()>::encoded_size_hint_u32(
bp_rialto::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX as _,
bp_rialto::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX as _,
);
pallet_bridge_messages::ensure_able_to_receive_confirmation::<Weights>(
bp_rialto::Rialto::max_extrinsic_size(),
@@ -276,7 +276,6 @@ mod tests {
assert_eq!(
dispatch_result,
MessageDispatchResult {
dispatch_result: true,
unspent_weight: frame_support::weights::Weight::from_ref_time(0),
dispatch_fee_paid_during_dispatch: false,
}
+3 -6
View File
@@ -511,7 +511,7 @@ pub mod target {
};
let xcm_outcome = do_dispatch();
let dispatch_result = match xcm_outcome {
match xcm_outcome {
Ok(outcome) => {
log::trace!(
target: "runtime::bridge-dispatch",
@@ -520,7 +520,7 @@ pub mod target {
outcome,
);
match outcome.ensure_execution() {
Ok(_weight) => true,
Ok(_weight) => (),
Err(e) => {
log::error!(
target: "runtime::bridge-dispatch",
@@ -528,7 +528,6 @@ pub mod target {
message_id,
e,
);
false
},
}
},
@@ -539,12 +538,10 @@ pub mod target {
message_id,
e,
);
false
},
};
}
MessageDispatchResult {
dispatch_result,
unspent_weight: Weight::zero(),
dispatch_fee_paid_during_dispatch: false,
}