chaindb: optimize coin size checking.

This commit is contained in:
Christopher Jeffrey 2016-08-01 23:42:16 -07:00
parent dfdee526db
commit 0b24daba31
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -880,7 +880,7 @@ ChainDB.prototype.connectBlock = function connectBlock(block, view, batch, callb
for (i = 0; i < view.length; i++) {
coins = view[i];
if (coins.count() === 0) {
if (coins.size() === 0) {
batch.del(layout.c(coins.hash));
this.coinCache.remove(coins.hash);
} else {
@ -976,7 +976,7 @@ ChainDB.prototype.disconnectBlock = function disconnectBlock(block, batch, callb
for (i = 0; i < view.length; i++) {
coins = view[i];
if (coins.count() === 0) {
if (coins.size() === 0) {
batch.del(layout.c(coins.hash));
self.coinCache.remove(coins.hash);
} else {