use nanosecond precision in waku timestamp (#152)
This commit is contained in:
parent
bbd313f70a
commit
fdc22111d3
|
@ -243,7 +243,7 @@ async fn send_transaction(
|
|||
payload,
|
||||
WAKU_CARNOT_TX_CONTENT_TOPIC.clone(),
|
||||
1,
|
||||
chrono::Utc::now().timestamp() as usize,
|
||||
chrono::Utc::now().timestamp_nanos() as usize,
|
||||
[],
|
||||
false,
|
||||
),
|
||||
|
|
|
@ -99,7 +99,7 @@ impl NetworkAdapter for MockAdapter {
|
|||
String::from_utf8_lossy(&chunk_message.as_bytes()).to_string(),
|
||||
MOCK_BLOCK_CONTENT_TOPIC,
|
||||
1,
|
||||
chrono::Utc::now().timestamp() as usize,
|
||||
chrono::Utc::now().timestamp_nanos() as usize,
|
||||
);
|
||||
if let Err((e, _)) = self
|
||||
.network_relay
|
||||
|
@ -166,7 +166,7 @@ impl NetworkAdapter for MockAdapter {
|
|||
String::from_utf8_lossy(&approval_message.as_bytes()).to_string(),
|
||||
MOCK_APPROVAL_CONTENT_TOPIC,
|
||||
1,
|
||||
chrono::Utc::now().timestamp() as usize,
|
||||
chrono::Utc::now().timestamp_nanos() as usize,
|
||||
);
|
||||
if let Err((e, _e)) = self
|
||||
.network_relay
|
||||
|
|
|
@ -116,7 +116,7 @@ impl WakuAdapter {
|
|||
bytes,
|
||||
topic,
|
||||
1,
|
||||
chrono::Utc::now().timestamp() as usize,
|
||||
chrono::Utc::now().timestamp_nanos() as usize,
|
||||
[],
|
||||
false,
|
||||
);
|
||||
|
@ -226,7 +226,7 @@ impl NetworkAdapter for WakuAdapter {
|
|||
approval_message.as_bytes(),
|
||||
content_topic,
|
||||
1,
|
||||
chrono::Utc::now().timestamp() as usize,
|
||||
chrono::Utc::now().timestamp_nanos() as usize,
|
||||
[],
|
||||
false,
|
||||
);
|
||||
|
|
|
@ -354,7 +354,7 @@ mod tests {
|
|||
content_topic_name: "foo content".into(),
|
||||
},
|
||||
version: 1,
|
||||
timestamp: chrono::Utc::now().timestamp() as usize,
|
||||
timestamp: chrono::Utc::now().timestamp_nanos() as usize,
|
||||
},
|
||||
})
|
||||
.await;
|
||||
|
@ -371,7 +371,7 @@ mod tests {
|
|||
content_topic_name: "bar content".into(),
|
||||
},
|
||||
version: 1,
|
||||
timestamp: chrono::Utc::now().timestamp() as usize,
|
||||
timestamp: chrono::Utc::now().timestamp_nanos() as usize,
|
||||
},
|
||||
})
|
||||
.await;
|
||||
|
|
Loading…
Reference in New Issue