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

Commit

Permalink
Upgrade ethereumjs-vm to latest version. Allow erroneous transactions…
Browse files Browse the repository at this point in the history
… to be traced.
  • Loading branch information
tcoulter committed Jul 31, 2017
1 parent 0710067 commit 6a0904c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion lib/blockchain_double.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,10 @@ BlockchainDouble.prototype.processTransactionTrace = function(hash, params, call

// #3 - Process the block without committing the data.
self.processBlock(block, false, function(err, transactions, results) {
// Do we ignore errors here? We want to ignore runtime errors.
// Ignore runtime errors, or else erroneous transactions can't be traced.
if (err.message.indexOf("VM Exception") == 0) {
err = null;
}

// #4 - reset the state root.
self.stateTrie.root = startingStateRoot;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ethereumjs-block": "~1.2.2",
"ethereumjs-tx": "^1.3.0",
"ethereumjs-util": "~5.1.0",
"ethereumjs-vm": "~2.0.1",
"ethereumjs-vm": "~2.2.0",
"ethereumjs-wallet": "~0.6.0",
"fake-merkle-patricia-tree": "~1.0.1",
"heap": "~0.2.6",
Expand Down
6 changes: 3 additions & 3 deletions test/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ var tests = function(web3) {

web3.eth.estimateGas(tx_data, function(err, result) {
if (err) return done(err);
assert.equal(result, 27684);
assert.equal(result, 27724);

web3.eth.getBlockNumber(function(err, result) {
if (err) return done(err);
Expand All @@ -601,7 +601,7 @@ var tests = function(web3) {

web3.eth.estimateGas(tx_data, function(err, result) {
if (err) return done(err);
assert.equal(result, 27684);
assert.equal(result, 27724);
done();
});
});
Expand All @@ -615,7 +615,7 @@ var tests = function(web3) {

web3.eth.estimateGas(tx_data, function(err, result) {
if (err) return done(err);
assert.equal(result, 27684);
assert.equal(result, 27724);
done();
});
});
Expand Down

0 comments on commit 6a0904c

Please sign in to comment.