File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 3232- Refactor gossipsub with in-place negative-score peer removal.
3333 See [ PR 6209] ( https://github.com/libp2p/rust-libp2p/pull/6209 ) .
3434
35+ - Avoid direct casting from u128 to u64.
36+ See [ PR 6211] ( https://github.com/libp2p/rust-libp2p/pull/6211 ) .
37+
3538## 0.49.2
3639
3740- Relax ` Behaviour::with_metrics ` requirements, do not require DataTransform and TopicSubscriptionFilter to also impl Default
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ enum PublishConfig {
183183
184184/// A strictly linearly increasing sequence number.
185185///
186- /// We start from the current time as unix timestamp in milliseconds .
186+ /// We start from the current time as unix timestamp in nanoseconds .
187187#[ derive( Debug ) ]
188188struct SequenceNumber ( u64 ) ;
189189
@@ -194,7 +194,10 @@ impl SequenceNumber {
194194 . expect ( "time to be linear" )
195195 . as_nanos ( ) ;
196196
197- Self ( unix_timestamp as u64 )
197+ Self (
198+ u64:: try_from ( unix_timestamp)
199+ . expect ( "timestamp in nanos since UNIX_EPOCH should fit in u64" ) ,
200+ )
198201 }
199202
200203 fn next ( & mut self ) -> u64 {
You can’t perform that action at this time.
0 commit comments