diff --git a/lib/bcoin/chaindb.js b/lib/bcoin/chaindb.js index 7b24fa7c..bdae44e3 100644 --- a/lib/bcoin/chaindb.js +++ b/lib/bcoin/chaindb.js @@ -536,7 +536,7 @@ ChainDB.prototype.save = function save(entry, block, view, connect, callback) { var hash = block.hash(); var height = new Buffer(4); - height.writeUInt32LE(height, 0, true); + height.writeUInt32LE(entry.height, 0, true); batch.put(layout.h(hash), height); batch.put(layout.e(hash), entry.toRaw());