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

Commit

Permalink
update readme.md example
Browse files Browse the repository at this point in the history
  • Loading branch information
pzagor2 committed Nov 2, 2018
1 parent 087e693 commit f6761ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A module to store and interact with blocks.

# EXAMPLE

The following is an example to iterate through an existing Geth DB (needs ``leveldown`` to be
The following is an example to iterate through an existing Geth DB (needs ```levelup``` and ``leveldown`` to be
installed separately):

```javascript
Expand All @@ -21,7 +21,7 @@ const Blockchain = require('ethereumjs-blockchain')
const utils = require('ethereumjs-util')

const gethDbPath = './chaindata' // Add your own path here
const db = levelup(gethDbPath, { db: leveldown })
const db = levelup(leveldown(gethDbPath))

new Blockchain({db: db}).iterator('i', (block, reorg, cb) => {
const blockNumber = utils.bufferToInt(block.header.number)
Expand Down

0 comments on commit f6761ad

Please sign in to comment.