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

pallet-ibc: adjust rate limit based on decimal places #3620

Merged
merged 2 commits into from May 18, 2023

Conversation

blasrodri
Copy link
Contributor

@blasrodri blasrodri commented May 18, 2023

  • PR title is my best effort to provide summary of changes and has clear text to be part of release notes
  • I marked PR by misc label if it should not be in release notes
  • I have linked Zenhub/Github or any other reference item if one exists
  • I was clear on what type of deployment required to release my changes (node, runtime, contract, indexer, on chain operation, frontend, infrastructure) if any in PR title or description
  • I waited and did best effort for pr-workflow-check / draft-release-check to finish with success(green check mark) with my changes
  • I have added at least one reviewer in reviewers list
  • I tagged(@) or used other form of notification of one person who I think can handle best review of this PR

@blasrodri blasrodri requested a review from kkast May 18, 2023 12:48
@blasrodri blasrodri self-assigned this May 18, 2023
@blasrodri blasrodri added Parachain Team Issues for Parachain Team Bridging Team Issues for Bridging Team labels May 18, 2023
kkast
kkast previously approved these changes May 18, 2023
@blasrodri blasrodri enabled auto-merge May 18, 2023 12:54
@github-actions
Copy link

github-actions bot commented May 18, 2023

dzmitry-lahoda
dzmitry-lahoda previously approved these changes May 18, 2023
@RustNinja RustNinja self-requested a review May 18, 2023 13:21
RustNinja
RustNinja previously approved these changes May 18, 2023
@dzmitry-lahoda
Copy link
Contributor

oh no, @blasrodri you tried to brick us

native=/build/source/target/release/build/lz4-sys-eb1914ac8164e994/out`
2023-05-18T13:18:13.0380459Z composable-clippy> error: used `unwrap()` on `a Result` value
2023-05-18T13:18:13.0382855Z composable-clippy>    --> parachain/runtime/composable/src/ibc.rs:141:4
2023-05-18T13:18:13.0384463Z composable-clippy>     |
2023-05-18T13:18:13.0386662Z composable-clippy> 141 | /             <<Runtime as pallet_ibc::Config>::IbcDenomToAssetIdConversion as DenomToAssetId<
2023-05-18T13:18:13.0388047Z composable-clippy> 142 | |                 Runtime,
2023-05-18T13:18:13.0436443Z composable-clippy> 143 | |             >>::from_denom_to_asset_id(&token.denom.to_string())
2023-05-18T13:18:13.0478424Z composable-clippy> 144 | |             .unwrap();
2023-05-18T13:18:13.0480312Z composable-clippy>     | |_____________________^
2023-05-18T13:18:13.0482092Z composable-clippy>     |
2023-05-18T13:18:13.0483882Z composable-clippy>     = help: if you don't want to handle the `Err` case gracefully, consider using `expect()` to provide a better panic message
2023-05-18T13:18:13.0486186Z composable-clippy>     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
2023-05-18T13:18:13.0488426Z composable-clippy> note: the lint level is defined here
2023-05-18T13:18:13.0490401Z composable-clippy>    --> parachain/runtime/composable/src/lib.rs:8:3
2023-05-18T13:18:13.0491530Z composable-clippy>     |
2023-05-18T13:18:13.0492927Z composable-clippy> 8   |         clippy::unwrap_used,
2023-05-18T13:18:13.0494730Z composable-clippy>     |         ^^^^^^^^^^^^^^^^^^^
2023-05-18T13:18:13.0496268Z composable-clippy> error: use of a disallowed method `core::result::Result::unwrap`
2023-05-18T13:18:13.0497257Z composable-clippy>    --> parachain/runtime/composable/src/ibc.rs:141:4
2023-05-18T13:18:13.0498072Z composable-clippy>     |
2023-05-18T13:18:13.0500004Z composable-clippy> 141 | /             <<Runtime as pallet_ibc::Config>::IbcDenomToAssetIdConversion as DenomToAssetId<
2023-05-18T13:18:13.0501246Z composable-clippy> 142 | |                 Runtime,
2023-05-18T13:18:13.0915885Z composable-clippy> 143 | |             >>::from_denom_to_asset_id(&token.denom.to_string())
2023-05-18T13:18:13.0996226Z composable-clippy> 144 | |             .unwrap();
2023-05-18T13:18:13.1075340Z composable-clippy>     | |_____________________^
2023-05-18T13:18:13.1154877Z composable-clippy>     |
2023-05-18T13:18:13.1235537Z composable-clippy>     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
2023-05-18T13:18:13.1314541Z composable-clippy> note: the lint level is defined here
2023-05-18T13:18:13.1394850Z composable-clippy>    --> parachain/runtime/composable/src/lib.rs:4:3
2023-05-18T13:18:13.1474838Z composable-clippy>     |
2023-05-18T13:18:13.1555565Z composable-clippy> 4   |         clippy::disallowed_methods,
2023-05-18T13:18:13.1636054Z composable-clippy>     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-05-18T13:18:14.9282148Z composable-clippy> error: could not compile `composable-runtime` due to 2 previous errors

either use if let or do expect with explanation of prove

@blasrodri
Copy link
Contributor Author

oh no, @blasrodri you tried to brick us

native=/build/source/target/release/build/lz4-sys-eb1914ac8164e994/out`
2023-05-18T13:18:13.0380459Z composable-clippy> error: used `unwrap()` on `a Result` value
2023-05-18T13:18:13.0382855Z composable-clippy>    --> parachain/runtime/composable/src/ibc.rs:141:4
2023-05-18T13:18:13.0384463Z composable-clippy>     |
2023-05-18T13:18:13.0386662Z composable-clippy> 141 | /             <<Runtime as pallet_ibc::Config>::IbcDenomToAssetIdConversion as DenomToAssetId<
2023-05-18T13:18:13.0388047Z composable-clippy> 142 | |                 Runtime,
2023-05-18T13:18:13.0436443Z composable-clippy> 143 | |             >>::from_denom_to_asset_id(&token.denom.to_string())
2023-05-18T13:18:13.0478424Z composable-clippy> 144 | |             .unwrap();
2023-05-18T13:18:13.0480312Z composable-clippy>     | |_____________________^
2023-05-18T13:18:13.0482092Z composable-clippy>     |
2023-05-18T13:18:13.0483882Z composable-clippy>     = help: if you don't want to handle the `Err` case gracefully, consider using `expect()` to provide a better panic message
2023-05-18T13:18:13.0486186Z composable-clippy>     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
2023-05-18T13:18:13.0488426Z composable-clippy> note: the lint level is defined here
2023-05-18T13:18:13.0490401Z composable-clippy>    --> parachain/runtime/composable/src/lib.rs:8:3
2023-05-18T13:18:13.0491530Z composable-clippy>     |
2023-05-18T13:18:13.0492927Z composable-clippy> 8   |         clippy::unwrap_used,
2023-05-18T13:18:13.0494730Z composable-clippy>     |         ^^^^^^^^^^^^^^^^^^^
2023-05-18T13:18:13.0496268Z composable-clippy> error: use of a disallowed method `core::result::Result::unwrap`
2023-05-18T13:18:13.0497257Z composable-clippy>    --> parachain/runtime/composable/src/ibc.rs:141:4
2023-05-18T13:18:13.0498072Z composable-clippy>     |
2023-05-18T13:18:13.0500004Z composable-clippy> 141 | /             <<Runtime as pallet_ibc::Config>::IbcDenomToAssetIdConversion as DenomToAssetId<
2023-05-18T13:18:13.0501246Z composable-clippy> 142 | |                 Runtime,
2023-05-18T13:18:13.0915885Z composable-clippy> 143 | |             >>::from_denom_to_asset_id(&token.denom.to_string())
2023-05-18T13:18:13.0996226Z composable-clippy> 144 | |             .unwrap();
2023-05-18T13:18:13.1075340Z composable-clippy>     | |_____________________^
2023-05-18T13:18:13.1154877Z composable-clippy>     |
2023-05-18T13:18:13.1235537Z composable-clippy>     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
2023-05-18T13:18:13.1314541Z composable-clippy> note: the lint level is defined here
2023-05-18T13:18:13.1394850Z composable-clippy>    --> parachain/runtime/composable/src/lib.rs:4:3
2023-05-18T13:18:13.1474838Z composable-clippy>     |
2023-05-18T13:18:13.1555565Z composable-clippy> 4   |         clippy::disallowed_methods,
2023-05-18T13:18:13.1636054Z composable-clippy>     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-05-18T13:18:14.9282148Z composable-clippy> error: could not compile `composable-runtime` due to 2 previous errors

either use if let or do expect with explanation of prove

oh shit lol

@blasrodri blasrodri dismissed stale reviews from RustNinja, dzmitry-lahoda, and kkast via e11ea8b May 18, 2023 14:10
@blasrodri
Copy link
Contributor Author

Added a commit that removes .unwrap()

@dzmitry-lahoda dzmitry-lahoda merged commit fb1951c into main May 18, 2023
35 of 37 checks passed
@dzmitry-lahoda dzmitry-lahoda deleted the pallet-ibc-rate-limit-fix branch May 18, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bridging Team Issues for Bridging Team Parachain Team Issues for Parachain Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants