core, consensus: nanoseconds-precision timestamp

Keep timestamp of consensus messages in nanoseconds-precision state
This commit is contained in:
Anna Shaleva 2020-04-24 12:49:17 +03:00
parent aa554f0a9a
commit 0de5cb1bde
9 changed files with 22 additions and 9 deletions

View file

@ -74,10 +74,10 @@ func (n *neoBlock) MerkleRoot() util.Uint256 { return n.Block.MerkleRoot }
func (n *neoBlock) SetMerkleRoot(r util.Uint256) { n.Block.MerkleRoot = r }
// Timestamp implements block.Block interface.
func (n *neoBlock) Timestamp() uint64 { return n.Block.Timestamp }
func (n *neoBlock) Timestamp() uint64 { return n.Block.Timestamp * 1000000 }
// SetTimestamp implements block.Block interface.
func (n *neoBlock) SetTimestamp(ts uint64) { n.Block.Timestamp = ts }
func (n *neoBlock) SetTimestamp(ts uint64) { n.Block.Timestamp = ts / 1000000 }
// Index implements block.Block interface.
func (n *neoBlock) Index() uint32 { return n.Block.Index }