Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
Add isHomesteadReprice
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Oct 24, 2016
1 parent 663cee6 commit 88199e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions header.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,12 @@ BlockHeader.prototype.isGenesis = function () {
BlockHeader.prototype.isHomestead = function () {
return utils.bufferToInt(this.number) >= params.homeSteadForkNumber.v
}

/**
* Determines if a given block part of Homestead Reprice (EIP150) or not
* @method isHomesteadReprice
* @return Boolean
*/
BlockHeader.prototype.isHomesteadReprice = function () {
return utils.bufferToInt(this.number) >= params.homesteadRepriceForkNumber.v
}
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ Block.prototype.isHomestead = function () {
return this.header.isHomestead()
}

/**
* Determines if a given block part of homestead reprice or not
* @method isHomesteadReprice
* @return Boolean
*/
Block.prototype.isHomesteadReprice = function () {
return this.header.isHomesteadReprice()
}

/**
* turns the block in to the canonical genesis block
* @method setGenesisParams
Expand Down

0 comments on commit 88199e7

Please sign in to comment.