diff --git a/config/default.json b/config/default.json index 70ffe7f4..21111bee 100644 --- a/config/default.json +++ b/config/default.json @@ -23,6 +23,7 @@ "foundationRewardRate": 10, "gas": 2000000, "blockSignerGap": 15, + "blockSignerDelay": 5, "foundationAddress": "0x0000000000000000000000000000000000000068", "validatorAddress": "0x0000000000000000000000000000000000000088", "blockSignerAddress": "0x0000000000000000000000000000000000000089", diff --git a/crawl.js b/crawl.js index 41da409d..0d63c8e1 100644 --- a/crawl.js +++ b/crawl.js @@ -563,10 +563,10 @@ const getBlockSigners = async (number) => { async function updateLatestSignedBlock (blk) { try { - if (!blk || blk.number % parseInt(config.get('blockchain.blockSignerGap')) != 0) { + if (!blk || blk.number % parseInt(config.get('blockchain.blockSignerGap')) != parseInt(config.get('blockchain.blockSignerDelay'))) { return } - const signers = await getBlockSigners(blk.number) + const signers = await getBlockSigners(blk.number - parseInt(config.get('blockchain.blockSignerDelay'))) let bulkOps = [] for (const signer of signers) { bulkOps.push({