diff --git a/modules/blocks/chain.js b/modules/blocks/chain.js index d68aff9ce19..f02e7839459 100644 --- a/modules/blocks/chain.js +++ b/modules/blocks/chain.js @@ -328,12 +328,12 @@ __private.applyTransaction = function (block, transaction, sender, cb) { * @emits SIGTERM * @param {Object} block Full normalized block * @param {boolean} broadcast Indicator that block needs to be broadcasted - * @param {Function} cb Callback function * @param {boolean} saveBlock Indicator that block needs to be saved to database + * @param {Function} cb Callback function * @return {Function} cb Callback function from params (through setImmediate) * @return {Object} cb.err Error if occurred */ -Chain.prototype.applyBlock = function (block, broadcast, cb, saveBlock) { +Chain.prototype.applyBlock = function (block, broadcast, saveBlock, cb) { // Prevent shutdown during database writes. modules.blocks.isActive.set(true); diff --git a/modules/blocks/verify.js b/modules/blocks/verify.js index e8b43e96645..b03120d92ee 100644 --- a/modules/blocks/verify.js +++ b/modules/blocks/verify.js @@ -474,7 +474,7 @@ Verify.prototype.processBlock = function (block, broadcast, saveBlock, cb) { // * Block and transactions have valid values (signatures, block slots, etc...) // * The check against database state passed (for instance sender has enough LSK, votes are under 101, etc...) // We thus update the database with the transactions values, save the block and tick it - modules.blocks.chain.applyBlock(block, broadcast, cb, saveBlock); + modules.blocks.chain.applyBlock(block, broadcast, saveBlock, cb); } }); };