From 5e85d9cd6463689480b69488b64ff04ddd4f512c Mon Sep 17 00:00:00 2001 From: noandrea Date: Mon, 4 Mar 2024 03:32:01 -0800 Subject: [PATCH] fix tests --- runtime/moonbase/tests/integration_test.rs | 8 ++++---- .../dev/moonbase/test-fees/test-fee-multiplier-max.ts | 4 ++-- .../dev/moonbase/test-fees/test-fee-multiplier-xcm.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/runtime/moonbase/tests/integration_test.rs b/runtime/moonbase/tests/integration_test.rs index d0175aa7068..af70d8f9bff 100644 --- a/runtime/moonbase/tests/integration_test.rs +++ b/runtime/moonbase/tests/integration_test.rs @@ -2932,19 +2932,19 @@ mod fee_tests { assert_eq!( sim(1_000_000_000, Perbill::from_percent(0), 1), - U256::from(999_000_500), + U256::from(998_002_000), ); assert_eq!( sim(1_000_000_000, Perbill::from_percent(25), 1), - U256::from(1_000_000_000), + U256::from(999_000_500), ); assert_eq!( sim(1_000_000_000, Perbill::from_percent(50), 1), - U256::from(1_001_000_500), + U256::from(1_000_000_000), ); assert_eq!( sim(1_000_000_000, Perbill::from_percent(100), 1), - U256::from(1_003_004_500), + U256::from(1_002_002_000), ); // 1 "real" hour (at 12-second blocks) diff --git a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts index 26bf750bdb7..8c9b8329878 100644 --- a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts +++ b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-max.ts @@ -139,7 +139,7 @@ describeSuite({ blockNumber = (await context.polkadotJs().rpc.chain.getHeader()).number.toBigInt(); baseFeePerGas = (await context.viem().getBlock({ blockNumber: blockNumber })) .baseFeePerGas!; - expect(baseFeePerGas).to.equal(124_883_131_084_512n); + expect(baseFeePerGas).to.equal(124_758_310_508_112n); const rawSigned = await createEthersTransaction(context, { to: contractAddress, @@ -171,7 +171,7 @@ describeSuite({ expect(withdrawEvents?.length).to.equal(1); const withdrawEvent = withdrawEvents![0]; const amount = withdrawEvent.event.data.amount.toBigInt(); - expect(amount).to.equal(11_880_382_026_331_795_584n); + expect(amount).to.equal(11_868_507_595_257_710_784n); }, }); }, diff --git a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-xcm.ts b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-xcm.ts index f261a8d7aff..49baf78bc88 100644 --- a/test/suites/dev/moonbase/test-fees/test-fee-multiplier-xcm.ts +++ b/test/suites/dev/moonbase/test-fees/test-fee-multiplier-xcm.ts @@ -14,7 +14,7 @@ import { // export const TARGET_FILL_AMOUNT = // ((MAX_BLOCK_WEIGHT * 0.75 * 0.25 - EXTRINSIC_BASE_WEIGHT) / MAX_BLOCK_WEIGHT) * 1_000_000_000; // In 0.9.43 rootTesting::fillBlock() now uses more weight so we need to account for that -const TARGET_FILL_AMOUNT = 186_927_918; +const TARGET_FILL_AMOUNT = 374_427_918; // Note on the values from 'transactionPayment.nextFeeMultiplier': this storage item is actually a // FixedU128, which is basically a u128 with an implicit denominator of 10^18. However, this