Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const config: HardhatUserConfig = {
mnemonic: DEFAULT_TEST_MNEMONIC,
},
mining: {
auto: true,
auto: false,
interval: 30000,
},
hardfork: 'london',
Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fi
mkdir -p reports

# Run using the standalone evm instance
npx hardhat test --network hardhat
npx hardhat test --network hardhat $@

### Cleanup

Expand Down
8 changes: 7 additions & 1 deletion test/lib/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { utils, Wallet, Signer } from 'ethers'

import * as deployment from './deployment'
import { evmSnapshot, evmRevert } from './testHelpers'
import { evmSnapshot, evmRevert, provider } from './testHelpers'

export class NetworkFixture {
lastSnapshotId: number
Expand All @@ -16,6 +16,12 @@ export class NetworkFixture {
slasher: Signer = Wallet.createRandom() as Signer,
arbitrator: Signer = Wallet.createRandom() as Signer,
): Promise<any> {
// Enable automining with each transaction, and disable
// the mining interval. Individual tests may modify this
// behavior as needed.
provider().send('evm_setIntervalMining', [0])
provider().send('evm_setAutomine', [true])

// Roles
const arbitratorAddress = await arbitrator.getAddress()
const slasherAddress = await slasher.getAddress()
Expand Down