chaindb: minor fixes.
This commit is contained in:
parent
8f3667b866
commit
7c2171966c
@ -798,10 +798,6 @@ ChainDB.prototype.count = function count() {
|
||||
};
|
||||
|
||||
ChainDB.prototype.cache = function cache(entry) {
|
||||
// Could use this.count() - 1 here as
|
||||
// long as we're not using saveAsync.
|
||||
// if (this.tip !== -1)
|
||||
// assert.equal(this.tip, this.count() - 1);
|
||||
if (entry.height > this.tip) {
|
||||
this.tip = entry.height;
|
||||
delete this._cache[entry.height - this._cacheWindow];
|
||||
@ -925,8 +921,6 @@ ChainDB.prototype.saveAsync = function saveAsync(entry, callback) {
|
||||
return this._writeAsync(raw, offset, function(err, success) {
|
||||
var item = self._queue[entry.height];
|
||||
|
||||
assert(item);
|
||||
|
||||
// Something tried to write here but couldn't.
|
||||
// Synchronously write it and get it over with.
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user