Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was 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

@bkontur

Description

@bkontur

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions