Closed
Conversation
clearloop
commented
Sep 2, 2021
| #[test] | ||
| fn unlock() { | ||
| new_test_ext().execute_with(|| { | ||
| new_test_ext_from_genesis().execute_with(|| { |
Contributor
Author
There was a problem hiding this comment.
needs this to async with benchmarks
Contributor
Author
mattsse
suggested changes
Sep 3, 2021
Comment on lines
+113
to
+118
| // NOTE: | ||
| // | ||
| // the result will be 0 or 1 | ||
| // | ||
| // - 0 for tests | ||
| // - 1 for benchmarks ( transaction fee ) |
Contributor
There was a problem hiding this comment.
this is rather confusing and depends on the configured fees,
can we simplify this check somehow, by checking that fees are sent to the treasury?
or remove it, this selective check does probably more harm than good
Comment on lines
+122
to
+149
| // TODO: | ||
| // | ||
| // This extrinsic requires `remote-asset-manager` | ||
| // | ||
| // ---- | ||
| // | ||
| // remove_asset { | ||
| // let asset_id = T::try_convert(2u8).unwrap(); | ||
| // let units = 100_u32.into(); | ||
| // let amount = 1_000u32.into(); | ||
| // let origin = T::AdminOrigin::successful_origin(); | ||
| // let origin_account_id = T::AdminOrigin::ensure_origin(origin.clone()).unwrap(); | ||
| // let receiver = whitelisted_account::<T>("receiver", 0); | ||
| // | ||
| // // create liquid assets | ||
| // assert_ok!(<AssetIndex<T>>::add_asset( | ||
| // origin.clone(), | ||
| // asset_id, | ||
| // units, | ||
| // MultiLocation::Null, | ||
| // amount | ||
| // )); | ||
| // | ||
| // // create price feed | ||
| // T::PriceFeedBenchmarks::create_feed(origin_account_id.clone(), asset_id).unwrap(); | ||
| // | ||
| // // construct call | ||
| // let call = Call::<T>::remove_asset(asset_id, units, Some(receiver)); |
Contributor
There was a problem hiding this comment.
good catch with all the xcm dependent calls.
They can't be benchmarked like that in any case so we can remove them.
the weights for these calls will come from the upcoming xcm benchmarking suite in polkadot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Tests
Issues