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:
Alexis Sellier
2023-02-14 20:31:40 +01:00
parent 867eea5c38
commit 7919c7ea61
10 changed files with 36 additions and 36 deletions
+2 -2
View File
@@ -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(),
);