diff --git a/lib/SerializerAppend.js b/lib/SerializerAppend.js index efaac7ef..57afccda 100644 --- a/lib/SerializerAppend.js +++ b/lib/SerializerAppend.js @@ -487,7 +487,7 @@ class AppendSerializer { } const blockCount = Math.ceil( - (activeTable.nextByte % activeTable.logSize + contentLength) / + ((activeTable.nextByte % activeTable.logSize) + contentLength) / activeTable.logSize, ); let nextByte = activeTable.nextByte; @@ -500,7 +500,7 @@ class AppendSerializer { bufferIndex, Math.min( bufferIndex + - (activeTable.logSize - nextByte % activeTable.logSize), + (activeTable.logSize - (nextByte % activeTable.logSize)), contentLength, ), ); diff --git a/lib/SerializerCacache.js b/lib/SerializerCacache.js index ed320c05..7c3f89e3 100644 --- a/lib/SerializerCacache.js +++ b/lib/SerializerCacache.js @@ -9,8 +9,7 @@ class CacacheSerializer { const cache = {}; const promises = []; return new Promise((resolve, reject) => { - cacache.ls - .stream(this.path) + cacache.ls.stream(this.path) .on('data', ({ key }) => { promises.push( cacache.get(this.path, key).then(({ data }) => { diff --git a/lib/SerializerLeveldb.js b/lib/SerializerLeveldb.js index 66028735..d8cd5187 100644 --- a/lib/SerializerLeveldb.js +++ b/lib/SerializerLeveldb.js @@ -18,8 +18,7 @@ class LevelDbSerializer { db => new Promise((resolve, reject) => { const dbClose = promisify(db.close, { context: db }); - db - .createReadStream() + db.createReadStream() .on('data', data => { const value = data.value; if (!moduleCache[data.key]) { diff --git a/lib/SystemParity.js b/lib/SystemParity.js index b63f49ab..f3ae24dd 100644 --- a/lib/SystemParity.js +++ b/lib/SystemParity.js @@ -1,4 +1,5 @@ const pluginCompat = require('./util/plugin-compat'); +const logMessages = require('./util/log-messages'); const { ParityRoot } = require('./util/parity'); class ParitySystem {