This repository has been archived by the owner on Apr 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0eff24b
commit 85c8a59
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,10 @@ var Block = module.exports = function (data, opts) { | |
let chain = opts.chain ? opts.chain : 'mainnet' | ||
let hardfork = opts.hardfork ? opts.hardfork : null | ||
this._common = new Common(chain, hardfork) | ||
if (!hardfork) { | ||
hardfork = this._common.activeHardforks() | ||
This comment has been minimized.
Sorry, something went wrong. |
||
this._common._hardfork = hardfork | ||
This comment has been minimized.
Sorry, something went wrong.
alcuadrado
Member
|
||
} | ||
} | ||
|
||
this.transactions = [] | ||
|
@@ -69,9 +73,8 @@ var Block = module.exports = function (data, opts) { | |
for (var i = 0; i < rawUncleHeaders.length; i++) { | ||
this.uncleHeaders.push(new BlockHeader(rawUncleHeaders[i], opts)) | ||
} | ||
|
||
for (i = 0; i < rawTransactions.length; i++) { | ||
var tx = new Tx(rawTransactions[i], opts) | ||
var tx = new Tx(rawTransactions[i], {common: this._common}) | ||
this.transactions.push(tx) | ||
} | ||
} | ||
|
How can this know which hardfork to return?