mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
node: Use millisecond precision for timestamps
Previously we used seconds, which could result in false positives when checking for stale announcements, if things happened too quickly.
This commit is contained in:
@@ -440,7 +440,7 @@ mod tests {
|
||||
let msg: Message = AnnouncementMessage::from(RefsAnnouncement {
|
||||
id: arbitrary::gen(1),
|
||||
refs: bounded_refs,
|
||||
timestamp: LocalTime::now().as_secs(),
|
||||
timestamp: LocalTime::now().as_millis(),
|
||||
})
|
||||
.signed(&MockSigner::default())
|
||||
.into();
|
||||
@@ -470,7 +470,7 @@ mod tests {
|
||||
inventory: arbitrary::vec(INVENTORY_LIMIT)
|
||||
.try_into()
|
||||
.expect("size within bounds limit"),
|
||||
timestamp: LocalTime::now().as_secs(),
|
||||
timestamp: LocalTime::now().as_millis(),
|
||||
},
|
||||
&MockSigner::default(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user