From 1964ba40224d66b69bc70b17d8b2b207e473a681 Mon Sep 17 00:00:00 2001 From: micahriggan Date: Tue, 26 Mar 2019 12:07:19 -0400 Subject: [PATCH 1/2] homestead fix Fixing homestead bug where homestead rules are used on blocks before the fork. --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 32404f5..d40210a 100644 --- a/index.js +++ b/index.js @@ -71,9 +71,10 @@ var Block = module.exports = function (data, opts) { } // parse transactions + const height = new BN(this.header.number).toNumber() for (i = 0; i < rawTransactions.length; i++) { var tx = new Tx(rawTransactions[i]) - tx._homestead = true + tx._homestead = height >= 1150000; this.transactions.push(tx) } } From 4baf287ec6bef77567e3d38757874d1b4ebad32f Mon Sep 17 00:00:00 2001 From: micahriggan Date: Tue, 26 Mar 2019 16:17:43 -0400 Subject: [PATCH 2/2] Update index.js Removing semi-colon --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index d40210a..7a20151 100644 --- a/index.js +++ b/index.js @@ -74,7 +74,7 @@ var Block = module.exports = function (data, opts) { const height = new BN(this.header.number).toNumber() for (i = 0; i < rawTransactions.length; i++) { var tx = new Tx(rawTransactions[i]) - tx._homestead = height >= 1150000; + tx._homestead = height >= 1150000 this.transactions.push(tx) } }