|
|
@@ -11,7 +11,7 @@ use tui::{
|
|
|
Frame,
|
|
|
};
|
|
|
|
|
|
-use darkfi::util::Timestamp;
|
|
|
+use darkfi::util::NanoTimestamp;
|
|
|
|
|
|
use crate::{
|
|
|
error::{DnetViewError, DnetViewResult},
|
|
|
@@ -22,7 +22,7 @@ use crate::{
|
|
|
#[derive(Debug)]
|
|
|
pub struct View {
|
|
|
pub nodes: NodeInfoView,
|
|
|
- pub msg_log: FxHashMap<String, Vec<(Timestamp, String, String)>>,
|
|
|
+ pub msg_log: FxHashMap<String, Vec<(NanoTimestamp, String, String)>>,
|
|
|
pub active_ids: IdListView,
|
|
|
pub selectables: FxHashMap<String, SelectableObject>,
|
|
|
}
|
|
|
@@ -30,7 +30,7 @@ pub struct View {
|
|
|
impl View {
|
|
|
pub fn new(
|
|
|
nodes: NodeInfoView,
|
|
|
- msg_log: FxHashMap<String, Vec<(Timestamp, String, String)>>,
|
|
|
+ msg_log: FxHashMap<String, Vec<(NanoTimestamp, String, String)>>,
|
|
|
active_ids: IdListView,
|
|
|
selectables: FxHashMap<String, SelectableObject>,
|
|
|
) -> View {
|
|
|
@@ -40,7 +40,7 @@ impl View {
|
|
|
pub fn update(
|
|
|
&mut self,
|
|
|
nodes: FxHashMap<String, NodeInfo>,
|
|
|
- msg_log: FxHashMap<String, Vec<(Timestamp, String, String)>>,
|
|
|
+ msg_log: FxHashMap<String, Vec<(NanoTimestamp, String, String)>>,
|
|
|
selectables: FxHashMap<String, SelectableObject>,
|
|
|
) {
|
|
|
self.update_nodes(nodes);
|
|
|
@@ -75,7 +75,7 @@ impl View {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- fn update_msg_log(&mut self, msg_log: FxHashMap<String, Vec<(Timestamp, String, String)>>) {
|
|
|
+ fn update_msg_log(&mut self, msg_log: FxHashMap<String, Vec<(NanoTimestamp, String, String)>>) {
|
|
|
for (id, msg) in msg_log {
|
|
|
self.msg_log.insert(id, msg);
|
|
|
}
|