Mark FlatDb as closed when closed
This commit is contained in:
@@ -65,6 +65,7 @@ export default class FileFlatDb implements BaseDb {
|
||||
|
||||
fs.closeSync(this._fd);
|
||||
|
||||
this._fd = -1;
|
||||
this._lruBranch.clear();
|
||||
this._lruData.clear();
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ export default class Trie implements TrieDb {
|
||||
keys = this._snapshot(dest, fn, u8a, keys, percent, depth + 1);
|
||||
}
|
||||
|
||||
percent += (100 / node.length) / Math.pow(17, depth);
|
||||
percent += (100 / node.length) / Math.pow(16, depth);
|
||||
});
|
||||
|
||||
return keys;
|
||||
|
||||
Reference in New Issue
Block a user