mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 23:15:42 +00:00
Fix use of weight limit errors (#4358)
This commit is contained in:
@@ -344,7 +344,7 @@ impl<Config: config::Config> XcmExecutor<Config> {
|
||||
let dispatch_origin = Config::OriginConverter::convert_origin(origin, origin_type)
|
||||
.map_err(|_| XcmError::BadOrigin)?;
|
||||
let weight = message_call.get_dispatch_info().weight;
|
||||
ensure!(weight <= require_weight_at_most, XcmError::TooMuchWeightRequired);
|
||||
ensure!(weight <= require_weight_at_most, XcmError::MaxWeightInvalid);
|
||||
let actual_weight = match message_call.dispatch(dispatch_origin) {
|
||||
Ok(post_info) => post_info.actual_weight,
|
||||
Err(error_and_info) => {
|
||||
|
||||
Reference in New Issue
Block a user