mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-19 17:16:09 +00:00
[XCM] Treat recursion limit error as transient in the MQ (#4202)
Changes: - Add new error variant `ProcessMessageError::StackLimitReached` and treat XCM error `ExceedsStackLimit` as such. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Branislav Kontur <bkontur@gmail.com>
This commit is contained in:
1 parent
b801d001e8
commit
0770417880
7 files changed
+187
-6
No files matched your search
@@ -198,6 +198,7 @@ impl ProcessMessage for RecordingMessageProcessor {
|
||||
|
||||
parameter_types! {
|
||||
pub static Callback: Box<fn (&MessageOrigin, u32)> = Box::new(|_, _| {});
|
||||
pub static IgnoreStackOvError: bool = false;
|
||||
}
|
||||
|
||||
/// Processed a mocked message. Messages that end with `badformat`, `corrupt`, `unsupported` or
|
||||
@@ -216,6 +217,8 @@ fn processing_message(msg: &[u8], origin: &MessageOrigin) -> Result<(), ProcessM
|
||||
Err(ProcessMessageError::Unsupported)
|
||||
} else if msg.ends_with("yield") {
|
||||
Err(ProcessMessageError::Yield)
|
||||
} else if msg.ends_with("stacklimitreached") && !IgnoreStackOvError::get() {
|
||||
Err(ProcessMessageError::StackLimitReached)
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user