Skip to content

Commit

Permalink
tests: wait first block to release genesis reward before starting int…
Browse files Browse the repository at this point in the history
…egration tests
  • Loading branch information
pedroferreira1 committed Nov 7, 2023
1 parent 141079d commit 6050676
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setupTests-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { TX_MINING_URL } from './__tests__/integration/configuration/test-consta
import {
precalculationHelpers, WalletPrecalculationHelper
} from './__tests__/integration/helpers/wallet-precalculation.helper';
import { GenesisWalletHelper } from './__tests__/integration/helpers/genesis-wallet.helper';
import { waitNextBlock } from './__tests__/integration/helpers/wallet.helper';

config.setTxMiningUrl(TX_MINING_URL);

Expand Down Expand Up @@ -40,6 +42,10 @@ beforeAll(async () => {
// Loading pre-calculated wallets
precalculationHelpers.test = new WalletPrecalculationHelper('./tmp/wallets.json');
await precalculationHelpers.test.initWithWalletsFile();

// Await first block to be mined to release genesis reward lock
const { hWallet: gWallet } = await GenesisWalletHelper.getSingleton();
await waitNextBlock(gWallet.storage);
});

afterAll(async () => {
Expand Down

0 comments on commit 6050676

Please sign in to comment.