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,
|
payload,
|
||||||
WAKU_CARNOT_TX_CONTENT_TOPIC.clone(),
|
WAKU_CARNOT_TX_CONTENT_TOPIC.clone(),
|
||||||
1,
|
1,
|
||||||
chrono::Utc::now().timestamp() as usize,
|
chrono::Utc::now().timestamp_nanos() as usize,
|
||||||
[],
|
[],
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
|
|
|
@ -99,7 +99,7 @@ impl NetworkAdapter for MockAdapter {
|
||||||
String::from_utf8_lossy(&chunk_message.as_bytes()).to_string(),
|
String::from_utf8_lossy(&chunk_message.as_bytes()).to_string(),
|
||||||
MOCK_BLOCK_CONTENT_TOPIC,
|
MOCK_BLOCK_CONTENT_TOPIC,
|
||||||
1,
|
1,
|
||||||
chrono::Utc::now().timestamp() as usize,
|
chrono::Utc::now().timestamp_nanos() as usize,
|
||||||
);
|
);
|
||||||
if let Err((e, _)) = self
|
if let Err((e, _)) = self
|
||||||
.network_relay
|
.network_relay
|
||||||
|
@ -166,7 +166,7 @@ impl NetworkAdapter for MockAdapter {
|
||||||
String::from_utf8_lossy(&approval_message.as_bytes()).to_string(),
|
String::from_utf8_lossy(&approval_message.as_bytes()).to_string(),
|
||||||
MOCK_APPROVAL_CONTENT_TOPIC,
|
MOCK_APPROVAL_CONTENT_TOPIC,
|
||||||
1,
|
1,
|
||||||
chrono::Utc::now().timestamp() as usize,
|
chrono::Utc::now().timestamp_nanos() as usize,
|
||||||
);
|
);
|
||||||
if let Err((e, _e)) = self
|
if let Err((e, _e)) = self
|
||||||
.network_relay
|
.network_relay
|
||||||
|
|
|
@ -116,7 +116,7 @@ impl WakuAdapter {
|
||||||
bytes,
|
bytes,
|
||||||
topic,
|
topic,
|
||||||
1,
|
1,
|
||||||
chrono::Utc::now().timestamp() as usize,
|
chrono::Utc::now().timestamp_nanos() as usize,
|
||||||
[],
|
[],
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
@ -226,7 +226,7 @@ impl NetworkAdapter for WakuAdapter {
|
||||||
approval_message.as_bytes(),
|
approval_message.as_bytes(),
|
||||||
content_topic,
|
content_topic,
|
||||||
1,
|
1,
|
||||||
chrono::Utc::now().timestamp() as usize,
|
chrono::Utc::now().timestamp_nanos() as usize,
|
||||||
[],
|
[],
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
|
|
@ -354,7 +354,7 @@ mod tests {
|
||||||
content_topic_name: "foo content".into(),
|
content_topic_name: "foo content".into(),
|
||||||
},
|
},
|
||||||
version: 1,
|
version: 1,
|
||||||
timestamp: chrono::Utc::now().timestamp() as usize,
|
timestamp: chrono::Utc::now().timestamp_nanos() as usize,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
@ -371,7 +371,7 @@ mod tests {
|
||||||
content_topic_name: "bar content".into(),
|
content_topic_name: "bar content".into(),
|
||||||
},
|
},
|
||||||
version: 1,
|
version: 1,
|
||||||
timestamp: chrono::Utc::now().timestamp() as usize,
|
timestamp: chrono::Utc::now().timestamp_nanos() as usize,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
Loading…
Reference in New Issue