Skip to content

Commit

Permalink
Merge pull request trufflesuite#99 from trufflesuite/geth-unknown-tx-err
Browse files Browse the repository at this point in the history
Handle Geth `unknown transaction` error gracefully
  • Loading branch information
cgewecke committed Feb 19, 2018
2 parents d0bf9a9 + 432c227 commit a5b84bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/truffle-contract/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ var contract = (function(module) {

var make_attempt = function() {
C.web3.eth.getTransactionReceipt(tx, function(err, receipt) {
if (err) return reject(err);
if (err && !err.toString().includes('unknown transaction')){
return reject(err);
}

// Reject on transaction failures, accept otherwise
// Handles "0x00" or hex 0
Expand Down

0 comments on commit a5b84bc

Please sign in to comment.