difftreelog
Merge pull request #782 from UniqueNetwork/tests/app-promotion-forkless
in: master
Increase app-promotion periods for full node
3 files changed
tests/src/app-promotion.test.tsdiffbeforeafterboth--- a/tests/src/app-promotion.test.ts
+++ b/tests/src/app-promotion.test.ts
@@ -15,7 +15,9 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import {IKeyringPair} from '@polkadot/types/types';
-import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from './util';
+import {
+ itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip, LOCKING_PERIOD, UNLOCKING_PERIOD,
+} from './util';
import {DevUniqueHelper} from './util/playgrounds/unique.dev';
import {itEth, expect, SponsoringMode} from './eth/util';
@@ -24,8 +26,9 @@
let nominal: bigint;
let palletAddress: string;
let accounts: IKeyringPair[];
-const LOCKING_PERIOD = 8n; // 8 blocks of relay
-const UNLOCKING_PERIOD = 4n; // 4 blocks of parachain
+// App promotion periods:
+// LOCKING_PERIOD = 12 blocks of relay
+// UNLOCKING_PERIOD = 6 blocks of parachain
describe('App promotion', () => {
before(async function () {
tests/src/util/globalSetup.tsdiffbeforeafterboth2// SPDX-License-Identifier: Apache-2.02// SPDX-License-Identifier: Apache-2.0334import {usingPlaygrounds, Pallets, DONOR_FUNDING, MINIMUM_DONOR_FUND} from './index';4import {5 usingPlaygrounds, Pallets, DONOR_FUNDING, MINIMUM_DONOR_FUND, LOCKING_PERIOD, UNLOCKING_PERIOD,6} from './index';5import * as path from 'path';7import * as path from 'path';6import {promises as fs} from 'fs';8import {promises as fs} from 'fs';21 // 3. Configure App Promotion 23 // 3. Configure App Promotion 22 const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);24 const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);23 if (missingPallets.length === 0) {25 if (missingPallets.length === 0) {24 // TODO: move to config file25 const LOCKING_PERIOD = 8n; // 8 blocks of relay26 const UNLOCKING_PERIOD = 4n; // 4 blocks of parachain2728 const superuser = await privateKey('//Alice');26 const superuser = await privateKey('//Alice');29 const palletAddress = helper.arrange.calculatePalletAddress('appstake');27 const palletAddress = helper.arrange.calculatePalletAddress('appstake');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; // 12 blocks of relay
+export const UNLOCKING_PERIOD = 6n; // 6 blocks of parachain
+
+
export enum Pallets {
Inflation = 'inflation',
RmrkCore = 'rmrkcore',