Skip to content
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

[Argo] helper functions, overflow protection, small fixes #5160

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

kdembler
Copy link
Member

@kdembler kdembler commented Jun 4, 2024

Scope of changes:

  • Introduced few helper functions to limit code repetition in extrinsics and make them more readable
  • Added overflow protection in request_outbound_transfer
  • Rearranged checks in some extrinsics - we always check bridge status first
  • Added check to ensure bridge is paused before calling init_unpause_bridge
  • Added tests for:
    • Overflow
    • Trying to request or finalize when the bridge is paused
    • Trying to unpause active bridge
  • Removed tests for operator not set - after requiring the bridge to be active first, it's not possible for the bridge to be active and not have an operator at the same time

@ignazio-bovo ignazio-bovo self-requested a review June 4, 2024 14:45
Copy link
Contributor

@ignazio-bovo ignazio-bovo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@freakstatic freakstatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
the helper function were a good idea, looks better now, thanks 👍

@kdembler kdembler merged commit 4bcc058 into Joystream:petra Jun 4, 2024
7 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants