File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
async_substrate_interface Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,8 @@ async def process_events(self):
297297 and event ["event" ]["event_id" ] == "ExtrinsicFailed"
298298 ) or (
299299 event ["event" ]["module_id" ] == "MevShield"
300- and event ["event" ]["event_id" ] == "DecryptedRejected"
300+ and event ["event" ]["event_id" ]
301+ in ("DecryptedRejected" , "DecryptionFailed" )
301302 ):
302303 possible_success = False
303304 self .__is_success = False
@@ -308,13 +309,23 @@ async def process_events(self):
308309 self .__weight = dispatch_info ["weight" ]
309310 else :
310311 # MEV shield extrinsics
311- dispatch_info = event ["event" ]["attributes" ]["reason" ][
312- "post_info"
313- ]
314- dispatch_error = event ["event" ]["attributes" ]["reason" ]["error" ]
315- self .__weight = event ["event" ]["attributes" ]["reason" ][
316- "post_info"
317- ]["actual_weight" ]
312+ if event ["event" ]["event_id" ] == "DecryptedRejected" :
313+ dispatch_info = event ["event" ]["attributes" ]["reason" ][
314+ "post_info"
315+ ]
316+ dispatch_error = event ["event" ]["attributes" ]["reason" ][
317+ "error"
318+ ]
319+ self .__weight = event ["event" ]["attributes" ]["reason" ][
320+ "post_info"
321+ ]["actual_weight" ]
322+ else :
323+ self .__error_message = {
324+ "type" : "MevShield" ,
325+ "name" : "DecryptionFailed" ,
326+ "docs" : event ["event" ]["attributes" ]["reason" ],
327+ }
328+ continue
318329
319330 if "Module" in dispatch_error :
320331 if isinstance (dispatch_error ["Module" ], tuple ):
You can’t perform that action at this time.
0 commit comments