From 41d8bd9d4b9f6ba6e455bd5e297c1e12207b59d7 Mon Sep 17 00:00:00 2001 From: Yusef Napora Date: Mon, 11 Nov 2019 09:08:02 -0500 Subject: [PATCH] just use nanoseconds --- routing/state.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/routing/state.go b/routing/state.go index 3465eee..d71034b 100644 --- a/routing/state.go +++ b/routing/state.go @@ -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 {