Skip to content

Commit

Permalink
Try out a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
area committed Aug 14, 2018
1 parent 4d15706 commit 6848a95
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/statemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ StateManager.prototype.processBlocks = function(total_blocks, callback) {
StateManager.prototype.processCall = function (from, rawTx, blockNumber, callback) {
var self = this;

self.createFakeTransactionWithCorrectNonce(rawTx, from, function(err, tx) {
self.createFakeTransactionWithCorrectNonce(rawTx, from, blockNumber, function(err, tx) {
if (err) return callback(err);

self.blockchain.processCall(tx, blockNumber, function (err, results) {
Expand All @@ -587,7 +587,7 @@ StateManager.prototype.processCall = function (from, rawTx, blockNumber, callbac
StateManager.prototype.processGasEstimate = function (from, rawTx, blockNumber, callback) {
var self = this;

self.createFakeTransactionWithCorrectNonce(rawTx, from, function(err, tx) {
self.createFakeTransactionWithCorrectNonce(rawTx, from, blockNumber, function(err, tx) {
if (err) return callback(err);

self.blockchain.processCall(tx, blockNumber, function (err, results) {
Expand All @@ -608,7 +608,7 @@ StateManager.prototype.processGasEstimate = function (from, rawTx, blockNumber,
StateManager.prototype.processTransaction = function(from, rawTx, callback) {
var self = this;

self.createFakeTransactionWithCorrectNonce(rawTx, from, function(err, tx) {
self.createFakeTransactionWithCorrectNonce(rawTx, from, 'latest', function(err, tx) {
if (err) return callback(err);

self.blockchain.queueTransaction(tx);
Expand Down Expand Up @@ -813,7 +813,7 @@ StateManager.prototype.isUnlocked = function(address) {
return this.unlocked_accounts[address.toLowerCase()] != null;
};

StateManager.prototype.createFakeTransactionWithCorrectNonce = function(rawTx, from, callback) {
StateManager.prototype.createFakeTransactionWithCorrectNonce = function(rawTx, from, blockNumber, callback) {
const self = this;
self.blockchain.getQueuedNonce(from, (err, expectedNonce) => {
if (err) return callback(err);
Expand All @@ -835,7 +835,7 @@ StateManager.prototype.createFakeTransactionWithCorrectNonce = function(rawTx, f

// If we're calling a contract, check to make sure the address specified is a contract address
if (_transactionIsContractCall(rawTx)) {
self.getCode(to.hex(rawTx.to), 'latest', function(err, code) {
self.getCode(to.hex(rawTx.to), blockNumber, function(err, code) {
if (err) {
callback(err);
} else if (code === '0x0') {
Expand Down

0 comments on commit 6848a95

Please sign in to comment.