Validator API storage fixes and adjustments

This commit is contained in:
Jędrzej Stuczyński
2021-07-22 15:15:08 +01:00
parent 432e1e6065
commit c81454e00b
14 changed files with 1273 additions and 1206 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ use crate::network_monitor::monitor::sender::PacketSender;
use crate::network_monitor::monitor::summary_producer::SummaryProducer;
use crate::network_monitor::monitor::Monitor;
use crate::network_monitor::tested_network::TestedNetwork;
use crate::node_status_api::storage::NodeStatusStorage;
use crate::storage::NodeStatusStorage;
use crypto::asymmetric::{encryption, identity};
use futures::channel::mpsc;
use nymsphinx::addressing::clients::Recipient;
@@ -8,7 +8,7 @@ use crate::network_monitor::monitor::sender::PacketSender;
use crate::network_monitor::monitor::summary_producer::{NodeResult, SummaryProducer, TestReport};
use crate::network_monitor::test_packet::NodeType;
use crate::network_monitor::tested_network::TestedNetwork;
use crate::node_status_api::storage::NodeStatusStorage;
use crate::storage::NodeStatusStorage;
use log::{debug, info};
use std::process;
use tokio::time::{sleep, Duration, Instant};
@@ -6,8 +6,9 @@ use crate::network_monitor::test_packet::{NodeType, TestPacket};
use crate::PENALISE_OUTDATED;
use std::collections::HashMap;
#[derive(Debug)]
pub(crate) struct NodeResult {
pub(crate) pub_key: String,
pub(crate) identity: String,
pub(crate) owner: String,
pub(crate) working_ipv4: bool,
pub(crate) working_ipv6: bool,
@@ -20,9 +21,9 @@ struct NodeStatus {
}
impl NodeStatus {
fn into_node_status(self, pub_key: String, owner: String) -> NodeResult {
fn into_node_status(self, identity: String, owner: String) -> NodeResult {
NodeResult {
pub_key,
identity,
owner,
working_ipv4: self.ip_v4_compatible,
working_ipv6: self.ip_v6_compatible,