From f6761ad5edf1eac084284a2144d044935b1e565e Mon Sep 17 00:00:00 2001 From: Primoz Z Date: Fri, 2 Nov 2018 15:26:25 +0100 Subject: [PATCH] update readme.md example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)