mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 06:21:01 +00:00
* Fix use of weight limit errors (#791) * cargo +nightly fmt Co-authored-by: Gavin Wood <gavin@parity.io> Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
@@ -382,7 +382,9 @@ impl<T: Config> Pallet<T> {
|
|||||||
let weight = max_weight - weight_used;
|
let weight = max_weight - weight_used;
|
||||||
match Self::handle_xcm_message(sender, sent_at, xcm, weight) {
|
match Self::handle_xcm_message(sender, sent_at, xcm, weight) {
|
||||||
Ok(used) => weight_used = weight_used.saturating_add(used),
|
Ok(used) => weight_used = weight_used.saturating_add(used),
|
||||||
Err(XcmError::TooMuchWeightRequired) => {
|
Err(XcmError::WeightLimitReached(required))
|
||||||
|
if required <= max_weight =>
|
||||||
|
{
|
||||||
// That message didn't get processed this time because of being
|
// That message didn't get processed this time because of being
|
||||||
// too heavy. We leave it around for next time and bail.
|
// too heavy. We leave it around for next time and bail.
|
||||||
remaining_fragments = last_remaining_fragments;
|
remaining_fragments = last_remaining_fragments;
|
||||||
|
|||||||
Reference in New Issue
Block a user