Mark FlatDb as closed when closed

This commit is contained in:
Jaco Greeff
2018-09-07 10:44:44 +02:00
parent dd0ec259a5
commit daf84b850d
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -65,6 +65,7 @@ export default class FileFlatDb implements BaseDb {
fs.closeSync(this._fd);
this._fd = -1;
this._lruBranch.clear();
this._lruData.clear();
}
+1 -1
View File
@@ -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;