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

Commit

Permalink
switch to a log instead
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed Feb 17, 2023
1 parent 9e5d396 commit 04b97a5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/chains/ethereum/ethereum/src/blockchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1059,11 +1059,14 @@ export default class Blockchain extends Emittery<BlockchainTypedEvents> {
return hash;
} else {
// if the transaction is not executable, we just have to return the hash
if (
this.#instamine &&
this.#options.miner.instamine === "eager" &&
isExecutable
) {
if (this.#instamine && this.#options.miner.instamine === "eager") {
if (!isExecutable) {
// users have been confused about why ganache "hangs" when sending a transaction with a "too-high" nonce
// this message should help them understand what's going on
this.#options.logger.log(
`A transaction with hash "${hash}" has a too-high nonce; this transaction has been added to the pool, and will be included when its nonce is reached. See https://github.com/trufflesuite/ganache/issues/4165`
);
}
// in eager instamine mode we must wait for the transaction to be saved
// before we can return the hash
const { status, error } = await transaction.once("finalized");
Expand Down

0 comments on commit 04b97a5

Please sign in to comment.