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

@ -37,10 +37,10 @@ func (p *prepareRequest) DecodeBinary(r *io.BinReader) {
}
// Timestamp implements payload.PrepareRequest interface.
func (p *prepareRequest) Timestamp() uint64 { return p.timestamp }
func (p *prepareRequest) Timestamp() uint64 { return p.timestamp * 1000000 }
// SetTimestamp implements payload.PrepareRequest interface.
func (p *prepareRequest) SetTimestamp(ts uint64) { p.timestamp = ts }
func (p *prepareRequest) SetTimestamp(ts uint64) { p.timestamp = ts / 1000000 }
// Nonce implements payload.PrepareRequest interface.
func (p *prepareRequest) Nonce() uint64 { return p.nonce }