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

Commit

Permalink
Merge 9822749 into 9f7eebe
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerd77 committed Dec 18, 2019
2 parents 9f7eebe + 9822749 commit 8f25e87
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
(modification: no type change headlines) and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [4.0.3] - 2019-12-19

Supports `MuirGlacier` by updating `ethereumjs-block` to
[v2.2.2](https://github.com/ethereumjs/ethereumjs-block/releases/tag/v2.2.2)
and `ethereumjs-common` to
[v1.5.0](https://github.com/ethereumjs/ethereumjs-common/releases/tag/v1.5.0).

This release comes also with a completely refactored test suite, see
PR [#134](https://github.com/ethereumjs/ethereumjs-blockchain/pull/134).
Tests are now less coupled and it gets easier to modify tests or extend
the test suite.

[4.0.3]: https://github.com/ethereumjs/ethereumjs-blockchain/compare/v4.0.2...v4.0.3

## [4.0.2] - 2019-11-15

Supports Istanbul by updating `ethereumjs-block` to
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethereumjs-blockchain",
"version": "4.0.2",
"version": "4.0.3",
"description": "A module to store and interact with blocks",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -44,8 +44,8 @@
"dependencies": {
"async": "^2.6.1",
"ethashjs": "~0.0.7",
"ethereumjs-block": "~2.2.1",
"ethereumjs-common": "^1.1.0",
"ethereumjs-block": "~2.2.2",
"ethereumjs-common": "^1.5.0",
"ethereumjs-util": "~6.1.0",
"flow-stoplight": "^1.0.0",
"level-mem": "^3.0.1",
Expand Down
6 changes: 1 addition & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1044,11 +1044,7 @@ export default class Blockchain implements BlockchainInterface {
self._hashToNumber(blockHash, (err?: any, number?: any) => {
if (err) return cb(err)
blockNumber = number.addn(1)
async.whilst(
() => blockNumber,
run,
err => (err ? cb(err) : self._saveHeads(cb)),
)
async.whilst(() => blockNumber, run, err => (err ? cb(err) : self._saveHeads(cb)))
})

function run(cb2: any) {
Expand Down
4 changes: 2 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,11 +871,11 @@ test('blockchain test', t => {
})

t.test('mismatched chains', st => {
const common = new Common('rinkeby')
const common = new Common('mainnet')
const blockchain = new Blockchain({ common: common, validateBlocks: true, validatePow: false })
const blocks = [
new Block(null, { common: common }),
new Block(null, { chain: 'rinkeby' }),
new Block(null, { chain: 'mainnet' }),
new Block(null, { chain: 'ropsten' }),
]

Expand Down

0 comments on commit 8f25e87

Please sign in to comment.