This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
Introduce a check for replayer's can withdraw balance in MessageDispatch
trait
#134
Labels
Another problem here is that, if the relayer have no enough funds for paying to the dispatch origin, and we ignore it here, this message will probably be fail as a result.
But it does not make sense, because the message sender paid enough fees in source chain, the message is unluckily failed just because some relayer's fault.
Solution:
We might need to introduce another check before
dispatch
, to make sure this relayer have enough funds for thispre_dispatch
, otherwise, an invalidReceivalResult
should be returned before dispatch.https://github.com/darwinia-network/darwinia-messages-substrate/blob/main/modules/messages/src/lib.rs#L461-L471
https://github.com/darwinia-network/darwinia-messages-substrate/blob/main/modules/messages/src/inbound_lane.rs#L134-L142
I'll create an issue in repo
darwinia-messages-substrate
for fixing before continue.And here, we should remove
if
condition, and return Err iftransfer
failed.Originally posted by @hackfisher in darwinia-network/darwinia-common#1267 (comment)
The text was updated successfully, but these errors were encountered: