Asset conversion get_pool_id
fix (Ord
does not count with is_native
flag)
#14572
Conversation
bot help |
bot bench $ pallet dev pallet_asset_conversion |
LGTM, but I would probably avoid having 3 equal versions of the |
Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
well, yes, I dont like it either, but I also I am not sure if it fits to |
bot rebase |
bot bench $ pallet dev pallet_asset_conversion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some documentation errors but otherwise OK.
frame/transaction-payment/asset-conversion-tx-payment/src/mock.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
bot fmt |
1 similar comment
bot fmt |
bot clean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We could push the common code out into a crate under bin/node
and have the three locations depend on that?
couldnt this cause some circrular dependecy?
or what would be the best place for this common code @gilescope @jsidorenko |
LGTM |
bot merge |
…ive` flag) (#14572) * Asset conversion `get_pool_id` fix (`Ord` does not count with `is_native` flag) * Removed unnecessery clones + added `pool_account` to `PoolCreated` event * Fix bench compile * Fix bench * Improved `MultiAssetIdConverter::try_convert` * Removed `into_multiasset_id` from converter and moved to `BenchmarkHelper` * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_asset_conversion * Fixed doc * Typo * Removed `NativeOrAssetId` (test/mock) impl from types.rs to mock.rs... * Typo + 0u32 -> 0 * Update frame/asset-conversion/src/benchmarking.rs Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * Typo * ".git/.scripts/commands/fmt/fmt.sh" * Fix from Jegor * Try to fix the other failing benchmark * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_asset_conversion * Update frame/asset-conversion/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/asset-conversion/src/types.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/transaction-payment/asset-conversion-tx-payment/src/mock.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/asset-conversion/src/mock.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update bin/node/runtime/src/impls.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/asset-conversion/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update bin/node/runtime/src/impls.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Reverted NativeOrAssetId --------- Co-authored-by: command-bot <> Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> Co-authored-by: Jegor Sidorenko <jegor@parity.io> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
PR contains:
get_pool_id
(Ord does not count withis_native
flag) and consequnce is that e.g. on system parachain, we cannot useMultiLocation::parent()
as a native asset, becauseMultiLocation { parents: 1, ..}
>MultiLocation { parents: 0, ..}
(parents: 0 is some local asset on system parachain)MultiAssetIdConverter
handling (e.g. adds ability for runtime to filter supported assets and so on)NativeOrAssetId/NativeOrAssetIdConverter
dedicated for tests/mocks fromtypes.rs
Cumulus companion: paritytech/cumulus#2860