Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[asset-conversion] Fix benchmarks swap_exact_tokens_for_tokens / swap_tokens_for_exact_tokens #2874

Closed
bkontur opened this issue Jul 14, 2023 · 0 comments · Fixed by paritytech/substrate#14590
Assignees

Comments

@bkontur
Copy link
Contributor

bkontur commented Jul 14, 2023

e.g. for AssetHubWestend we use by default pub storage AllowMultiAssetPools: bool = false, so these two benchmarks fails.

problem is in the module: substrate -> frame/asset-conversion/src/benchmarking.rs that these two benchmarks does not count with T::AllowMultiAssetPools settting, in case of T::AllowMultiAssetPools = false benchamark should be able "prepare" valid data.

How to test:

  1. cd <substrate-dir>
  2. frame/asset-conversion/src/mock.rs change pub storage AllowMultiAssetPools: bool = false;
  3. run tests (dont mind other failing stuff, just these two are important for correct benchmarking)
cargo test -p pallet-asset-conversion --features runtime-benchmarks 

Based on branch: paritytech/substrate#14572 or if merged then master

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants