Adjust base xcm weights (all now like Kusama) (#6186)

This commit is contained in:
Jaco 2021-09-24 08:00:09 +03:00 committed by GitHub
parent abd25d72f8
commit 6db943a4a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,17 +3,15 @@
import type { ApiPromise } from '@polkadot/api';
import { KUSAMA_GENESIS, WESTEND_GENESIS } from '../constants';
import { KUSAMA_GENESIS } from '../constants';
// 3 * BaseXcmWeight on Kusama
const KUSAMA_WEIGHT = 3 * 1_000_000_000;
// On Rococo this is lower (3 * 100_000), but non-failing with the higher Kusama weights
const DEFAULT_WEIGHT = KUSAMA_WEIGHT;
const KNOWN_WEIGHTS: Record<string, number> = {
[KUSAMA_GENESIS]: KUSAMA_WEIGHT,
[WESTEND_GENESIS]: 3 * 10_000_000
[KUSAMA_GENESIS]: KUSAMA_WEIGHT
};
export function getTeleportWeight (api: ApiPromise): number {