-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xcm: fix for DenyThenTry Barrier #7169
Conversation
@yrong overall looks good so far, I was also thinking about another trait for that like this |
…adot-sdk into fix-for-deny-then-try
Co-authored-by: Francisco Aguirre <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
…adot-sdk into fix-for-deny-then-try
instructions: &mut [Instruction<RuntimeCall>], | ||
max_weight: Weight, | ||
properties: &mut Properties, | ||
) -> Option<ProcessMessageError>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand it better with the Option
because seeing Some(_)
makes me guess it will be denied but seeing Ok(_)
makes me doubt whether or not it's okay to deny or okay to pass.
To clear up all possible misunderstanding we could use a custom enum:
enum DenyResult {
Deny,
DontDeny,
}
Might be overkill though.
/cmd fmt |
Co-authored-by: Francisco Aguirre <[email protected]>
Co-authored-by: Francisco Aguirre <[email protected]>
Co-authored-by: Francisco Aguirre <[email protected]>
@acatangiu Please check if there is anything important that I should address for merging. |
/cmd fmt |
b30aa31
Resolves (partially): #7148 (see Problem 1 -
ShouldExecute
tuple implementation andDeny
filter tuple)This PR changes the behavior of
DenyThenTry
from the patternDenyIfAllMatch
toDenyIfAnyMatch
for the tuple.I would expect the latter is the right behavior so make the fix in place, but we can also add a dedicated Impl with the legacy one untouched.
TODO
DenyReserveTransferToRelayChain
DenyThenTry
as discussed here and update documentation if needed