mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-03-14 11:10:05 +08:00
just use nanoseconds
This commit is contained in:
parent
d75c257932
commit
f583d3c4ce
@ -123,10 +123,7 @@ func (s *RoutingState) Multiaddrs() []ma.Multiaddr {
|
||||
}
|
||||
|
||||
func statelessSeqNo() uint64 {
|
||||
// use current time in milliseconds as seq number
|
||||
// nanoseconds would overflow in 2262, but millis gives us
|
||||
// a few hundred thousand years
|
||||
return uint64(time.Now().UnixNano() / 1e6)
|
||||
return uint64(time.Now().UnixNano())
|
||||
}
|
||||
|
||||
func addrsFromProtobuf(addrs []*pb.RoutingStateRecord_AddressInfo) []*AnnotatedAddr {
|
||||
|
Loading…
Reference in New Issue
Block a user