diff --git a/lib/blockchain/index.js b/lib/blockchain/index.js index 168fabf..9fb28dd 100644 --- a/lib/blockchain/index.js +++ b/lib/blockchain/index.js @@ -104,7 +104,7 @@ class Blockchain { generateNextBlock (blockData) { const previousBlock = this.latestBlock; const nextIndex = previousBlock.index + 1; - const nextTimestamp = new Date().getTime() / 1000 + const nextTimestamp = Math.floor(new Date().getTime() / 1000); let nonce = 0; let nextHash = ''; const randSpinner = spinner.getRandomSpinner();