Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove autominer #837

Closed
wants to merge 5 commits into from
Closed
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
5 changes: 5 additions & 0 deletions e2e/test/e2e-tx-serial-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ describe("Transaction: serial TestContractBalances", () => {

it("Contract is deployed", async () => {
_contract = await deployTestContractBalances();

await send("evm_mine", []);
});

it("Eth_getCode is not null for deployed contract", async () => {
Expand Down Expand Up @@ -142,8 +144,11 @@ describe("Transaction: serial TestContractBalances", () => {
let nonce = await sendGetNonce(CHARLIE.address);
const contractOps = _contract.connect(CHARLIE.signer());
await contractOps.add(CHARLIE.address, 10, { nonce: nonce++ });
await send("evm_mine", []);
await contractOps.add(CHARLIE.address, 15, { nonce: nonce++ });
await send("evm_mine", []);
await contractOps.sub(CHARLIE.address, 5, { nonce: nonce++ });
await send("evm_mine", []);

// final balance
expect(await _contract.get(CHARLIE.address)).eq(20);
Expand Down
2 changes: 2 additions & 0 deletions e2e/test/e2e-tx-serial-transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ describe("Transaction: serial transfer", () => {
_txSentTimestamp = Math.floor(Date.now() / 1000);
_txHash = await sendRawTransaction(txSigned);
expect(_txHash).eq(keccak256(txSigned));

await send("evm_mine", []);
});
it("Transaction is created", async () => {
_tx = await send("eth_getTransactionByHash", [_txHash]);
Expand Down
5 changes: 0 additions & 5 deletions src/eth/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,6 @@ impl Executor {
return Err(e);
}
}

// TODO: remove automine
let miner = self.miner.lock().await;
miner.mine_local_and_commit().await?;

break tx_execution;
}
}
Expand Down
Loading