difftreelog
Increase app-promotion periods for full node
in: master
It works fine on dev node but fails on regular
3 files changed
tests/src/app-promotion.test.tsdiffbeforeafterboth161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from './util';18import {19 itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip, LOCKING_PERIOD, UNLOCKING_PERIOD,20} from './util';19import {DevUniqueHelper} from './util/playgrounds/unique.dev';21import {DevUniqueHelper} from './util/playgrounds/unique.dev';20import {itEth, expect, SponsoringMode} from './eth/util';22import {itEth, expect, SponsoringMode} from './eth/util';24let nominal: bigint;26let nominal: bigint;25let palletAddress: string;27let palletAddress: string;26let accounts: IKeyringPair[];28let accounts: IKeyringPair[];29// App promotion periods:27const LOCKING_PERIOD = 8n; // 8 blocks of relay30// LOCKING_PERIOD = 12n; // 8 blocks of relay28const UNLOCKING_PERIOD = 4n; // 4 blocks of parachain31// UNLOCKING_PERIOD = 6n; // 4 blocks of parachain293230describe('App promotion', () => {33describe('App promotion', () => {31 before(async function () {34 before(async function () {tests/src/util/globalSetup.tsdiffbeforeafterboth--- a/tests/src/util/globalSetup.ts
+++ b/tests/src/util/globalSetup.ts
@@ -1,7 +1,9 @@
// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
// SPDX-License-Identifier: Apache-2.0
-import {usingPlaygrounds, Pallets, DONOR_FUNDING, MINIMUM_DONOR_FUND} from './index';
+import {
+ usingPlaygrounds, Pallets, DONOR_FUNDING, MINIMUM_DONOR_FUND, LOCKING_PERIOD, UNLOCKING_PERIOD,
+} from './index';
import * as path from 'path';
import {promises as fs} from 'fs';
@@ -21,10 +23,6 @@
// 3. Configure App Promotion
const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);
if (missingPallets.length === 0) {
- // TODO: move to config file
- const LOCKING_PERIOD = 8n; // 8 blocks of relay
- const UNLOCKING_PERIOD = 4n; // 4 blocks of parachain
-
const superuser = await privateKey('//Alice');
const palletAddress = helper.arrange.calculatePalletAddress('appstake');
const palletAdmin = await privateKey('//PromotionAdmin');
tests/src/util/index.tsdiffbeforeafterboth--- a/tests/src/util/index.ts
+++ b/tests/src/util/index.ts
@@ -86,6 +86,11 @@
export const MINIMUM_DONOR_FUND = 100_000n;
export const DONOR_FUNDING = 1_000_000n;
+// App-promotion periods:
+export const LOCKING_PERIOD = 12n; // 8 blocks of relay
+export const UNLOCKING_PERIOD = 6n; // 4 blocks of parachain
+
+
export enum Pallets {
Inflation = 'inflation',
RmrkCore = 'rmrkcore',