minor perf.

This commit is contained in:
Christopher Jeffrey 2016-06-12 09:36:43 -07:00
parent 1e962a5594
commit 9d19388162
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -561,8 +561,8 @@ ChainDB.prototype.save = function save(entry, block, view, connect, callback) {
height.writeUInt32LE(height, 0, true);
batch.put(layout.h(entry.hash), height);
batch.put(layout.e(entry.hash), entry.toRaw());
batch.put(layout.h(hash), height);
batch.put(layout.e(hash), entry.toRaw());
this.cacheHash.set(entry.hash, entry);
@ -1413,7 +1413,7 @@ ChainDB.prototype.getUndoView = function getUndoView(block, callback) {
if (err)
return callback(err);
return self.getUndoCoins(block.hash('hex'), function(err, coins) {
return self.getUndoCoins(block.hash(), function(err, coins) {
if (err)
return callback(err);