diff --git a/README.md b/README.md index 7e63ce3..bb7c198 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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)