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

Commit 9eb3a53

Browse files
authored
Merge pull request #1899 from trufflesuite/geth-getBlock-null
Handle `null` getBlock returns during live/testnet migrations
2 parents 2f9db72 + 930db8e commit 9eb3a53

File tree

1 file changed

+3
-0
lines changed
  • packages/truffle-reporters/reporters/migrations-V5

1 file changed

+3
-0
lines changed

packages/truffle-reporters/reporters/migrations-V5/reporter.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ class Reporter {
314314
data.receipt.blockNumber
315315
);
316316

317+
// if geth returns null, try again!
318+
if (!block) return this.postDeploy(data);
319+
317320
data.timestamp = block.timestamp;
318321

319322
const balance = await data.contract.web3.eth.getBalance(tx.from);

0 commit comments

Comments
 (0)