core, consensus: nanoseconds-precision timestamp
Keep timestamp of consensus messages in nanoseconds-precision state
This commit is contained in:
parent
aa554f0a9a
commit
0de5cb1bde
9 changed files with 22 additions and 9 deletions
|
@ -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 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue