|
@@ -1,5 +1,5 @@
|
|
|
use async_std::sync::Mutex;
|
|
use async_std::sync::Mutex;
|
|
|
-use darkfi::util::Timestamp;
|
|
|
|
|
|
|
+use darkfi::util::NanoTimestamp;
|
|
|
use fxhash::{FxHashMap, FxHashSet};
|
|
use fxhash::{FxHashMap, FxHashSet};
|
|
|
use serde::{Deserialize, Serialize};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
@@ -20,7 +20,7 @@ pub enum SelectableObject {
|
|
|
pub struct Model {
|
|
pub struct Model {
|
|
|
pub ids: Mutex<FxHashSet<String>>,
|
|
pub ids: Mutex<FxHashSet<String>>,
|
|
|
pub nodes: Mutex<FxHashMap<String, NodeInfo>>,
|
|
pub nodes: Mutex<FxHashMap<String, NodeInfo>>,
|
|
|
- pub msg_log: Mutex<FxHashMap<String, Vec<(Timestamp, String, String)>>>,
|
|
|
|
|
|
|
+ pub msg_log: Mutex<FxHashMap<String, Vec<(NanoTimestamp, String, String)>>>,
|
|
|
pub selectables: Mutex<FxHashMap<String, SelectableObject>>,
|
|
pub selectables: Mutex<FxHashMap<String, SelectableObject>>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -28,7 +28,7 @@ impl Model {
|
|
|
pub fn new(
|
|
pub fn new(
|
|
|
ids: Mutex<FxHashSet<String>>,
|
|
ids: Mutex<FxHashSet<String>>,
|
|
|
nodes: Mutex<FxHashMap<String, NodeInfo>>,
|
|
nodes: Mutex<FxHashMap<String, NodeInfo>>,
|
|
|
- msg_log: Mutex<FxHashMap<String, Vec<(Timestamp, String, String)>>>,
|
|
|
|
|
|
|
+ msg_log: Mutex<FxHashMap<String, Vec<(NanoTimestamp, String, String)>>>,
|
|
|
selectables: Mutex<FxHashMap<String, SelectableObject>>,
|
|
selectables: Mutex<FxHashMap<String, SelectableObject>>,
|
|
|
) -> Model {
|
|
) -> Model {
|
|
|
Model { ids, nodes, msg_log, selectables }
|
|
Model { ids, nodes, msg_log, selectables }
|
|
@@ -85,7 +85,7 @@ pub struct ConnectInfo {
|
|
|
pub addr: String,
|
|
pub addr: String,
|
|
|
pub state: String,
|
|
pub state: String,
|
|
|
pub parent: String,
|
|
pub parent: String,
|
|
|
- pub msg_log: Vec<(Timestamp, String, String)>,
|
|
|
|
|
|
|
+ pub msg_log: Vec<(NanoTimestamp, String, String)>,
|
|
|
pub is_empty: bool,
|
|
pub is_empty: bool,
|
|
|
pub last_msg: String,
|
|
pub last_msg: String,
|
|
|
pub last_status: String,
|
|
pub last_status: String,
|
|
@@ -97,7 +97,7 @@ impl ConnectInfo {
|
|
|
addr: String,
|
|
addr: String,
|
|
|
state: String,
|
|
state: String,
|
|
|
parent: String,
|
|
parent: String,
|
|
|
- msg_log: Vec<(Timestamp, String, String)>,
|
|
|
|
|
|
|
+ msg_log: Vec<(NanoTimestamp, String, String)>,
|
|
|
is_empty: bool,
|
|
is_empty: bool,
|
|
|
last_msg: String,
|
|
last_msg: String,
|
|
|
last_status: String,
|
|
last_status: String,
|