Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

fix: queue calls to miner to allow multiple calls to evm_mine without awaiting #3246

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

MicaiahReid
Copy link
Contributor

@MicaiahReid MicaiahReid commented Jun 16, 2022

Fixes: #3248

const block = await provider.request({
method: "eth_getBlockByNumber",
params: [`0x1`]
const providerOptions: EthereumProviderOptions[] = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added only one new test to this file. Here, I'm running all of the pre-existing tests with both the "eager" and "strict" mode

);
const provider = await getProvider({
chain: { time: startDate },
...option
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some cases I have to merge our "instamine" options with other options needed for the test.

assert.strictEqual(currentBlock, initialBlock + 5);
});

it("should mine `n` blocks if called `n` times without awaiting", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only new test

@MicaiahReid MicaiahReid marked this pull request as draft June 16, 2022 17:14
@MicaiahReid MicaiahReid changed the title fix: queue calls to miner to prevent evm_mine hanging fix: queue calls to miner to allow multiple calls to evm_mine without awaiting Jun 16, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
Status: Stalled
Development

Successfully merging this pull request may close these issues.

Multiple concurrent calls to evm_mine without awaiting will only mine 1 block
1 participant