Align timestamp with Rust (#85)

This commit is contained in:
Jaco Greeff
2018-05-03 15:03:16 +02:00
committed by GitHub
parent f43fb165d0
commit bf9aa457b0
4 changed files with 36 additions and 35 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
"nock": "^9.1.0"
},
"dependencies": {
"@polkadot/storage-substrate": "^0.12.1",
"@polkadot/storage-substrate": "^0.12.2",
"@polkadot/util": "^0.19.4",
"@polkadot/util-crypto": "^0.19.4",
"@polkadot/util-keyring": "^0.19.4",
+1 -1
View File
@@ -80,7 +80,7 @@ module.exports = function mocks ({ emitter, storage, subscriptions }: MockState)
setStorageBn(storage, state.system.keys.nonceOf, newHead.number.addn(index), publicKey());
});
setStorageBn(storage, state.timestamp.keys.current, Date.now());
setStorageBn(storage, state.timestamp.keys.current, Math.floor(Date.now() / 1000));
updateSubs(subscriptions, 'subscribe_newHead', headerEncode(newHead));
}, 5000);