From 04b97a5870ffa92c312a98e4d9a6c1b53c8e7437 Mon Sep 17 00:00:00 2001 From: David Murdoch Date: Fri, 17 Feb 2023 16:32:03 -0500 Subject: [PATCH] switch to a log instead --- src/chains/ethereum/ethereum/src/blockchain.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/chains/ethereum/ethereum/src/blockchain.ts b/src/chains/ethereum/ethereum/src/blockchain.ts index d279fe40b3..10fef3b96e 100644 --- a/src/chains/ethereum/ethereum/src/blockchain.ts +++ b/src/chains/ethereum/ethereum/src/blockchain.ts @@ -1059,11 +1059,14 @@ export default class Blockchain extends Emittery { 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");