Renamed 'rtt_measurement' to verloc to avoid confusion
This commit is contained in:
@@ -16,7 +16,7 @@ pub(crate) fn config_template() -> &'static str {
|
||||
// While using normal toml marshalling would have been way simpler with less overhead,
|
||||
// I think it's useful to have comments attached to the saved config file to explain behaviour of
|
||||
// particular fields.
|
||||
// Note: any changes to the template must be reflected in the appropriate structs in mod.rs.
|
||||
// Note: any changes to the template must be reflected in the appropriate structs in verloc.
|
||||
r#"
|
||||
# This is a TOML config file.
|
||||
# For more information, see https://github.com/toml-lang/toml
|
||||
|
||||
@@ -16,7 +16,7 @@ pub(crate) fn config_template() -> &'static str {
|
||||
// While using normal toml marshalling would have been way simpler with less overhead,
|
||||
// I think it's useful to have comments attached to the saved config file to explain behaviour of
|
||||
// particular fields.
|
||||
// Note: any changes to the template must be reflected in the appropriate structs in mod.rs.
|
||||
// Note: any changes to the template must be reflected in the appropriate structs in verloc.
|
||||
r#"
|
||||
# This is a TOML config file.
|
||||
# For more information, see https://github.com/toml-lang/toml
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
// limitations under the License.
|
||||
|
||||
pub mod cached_packet_processor;
|
||||
pub mod rtt_measurement;
|
||||
pub mod verloc;
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::rtt_measurement::error::RttError;
|
||||
use crate::rtt_measurement::packet::{EchoPacket, ReplyPacket};
|
||||
use crate::verloc::error::RttError;
|
||||
use crate::verloc::packet::{EchoPacket, ReplyPacket};
|
||||
use bytes::{BufMut, BytesMut};
|
||||
use crypto::asymmetric::identity;
|
||||
use futures::StreamExt;
|
||||
+3
-3
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::rtt_measurement::listener::PacketListener;
|
||||
pub use crate::rtt_measurement::measurement::{AtomicVerlocResult, Verloc, VerlocResult};
|
||||
use crate::rtt_measurement::sender::{PacketSender, TestedNode};
|
||||
use crate::verloc::listener::PacketListener;
|
||||
pub use crate::verloc::measurement::{AtomicVerlocResult, Verloc, VerlocResult};
|
||||
use crate::verloc::sender::{PacketSender, TestedNode};
|
||||
use crypto::asymmetric::identity;
|
||||
use futures::stream::FuturesUnordered;
|
||||
use futures::StreamExt;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::rtt_measurement::error::RttError;
|
||||
use crate::verloc::error::RttError;
|
||||
use crypto::asymmetric::identity::{self, PUBLIC_KEY_LENGTH, SIGNATURE_LENGTH};
|
||||
use std::convert::TryInto;
|
||||
|
||||
+3
-3
@@ -12,9 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::rtt_measurement::error::RttError;
|
||||
use crate::rtt_measurement::measurement::Measurement;
|
||||
use crate::rtt_measurement::packet::{EchoPacket, ReplyPacket};
|
||||
use crate::verloc::error::RttError;
|
||||
use crate::verloc::measurement::Measurement;
|
||||
use crate::verloc::packet::{EchoPacket, ReplyPacket};
|
||||
use crypto::asymmetric::identity;
|
||||
use log::*;
|
||||
use rand::{thread_rng, Rng};
|
||||
@@ -5,7 +5,7 @@ pub(crate) fn config_template() -> &'static str {
|
||||
// While using normal toml marshalling would have been way simpler with less overhead,
|
||||
// I think it's useful to have comments attached to the saved config file to explain behaviour of
|
||||
// particular fields.
|
||||
// Note: any changes to the template must be reflected in the appropriate structs in mod.rs.
|
||||
// Note: any changes to the template must be reflected in the appropriate structs in verloc.
|
||||
r#"
|
||||
# This is a TOML config file.
|
||||
# For more information, see https://github.com/toml-lang/toml
|
||||
|
||||
@@ -5,7 +5,7 @@ pub(crate) fn config_template() -> &'static str {
|
||||
// While using normal toml marshalling would have been way simpler with less overhead,
|
||||
// I think it's useful to have comments attached to the saved config file to explain behaviour of
|
||||
// particular fields.
|
||||
// Note: any changes to the template must be reflected in the appropriate structs in mod.rs.
|
||||
// Note: any changes to the template must be reflected in the appropriate structs in verloc.
|
||||
r#"
|
||||
# This is a TOML config file.
|
||||
# For more information, see https://github.com/toml-lang/toml
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use mixnode_common::rtt_measurement::{AtomicVerlocResult, VerlocResult};
|
||||
use mixnode_common::verloc::{AtomicVerlocResult, VerlocResult};
|
||||
use rocket::State;
|
||||
use rocket_contrib::json::Json;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::node::http::{
|
||||
description::description,
|
||||
not_found,
|
||||
stats::stats,
|
||||
verloc::{verloc, VerlocState},
|
||||
verloc::{verloc as verlocRoute, VerlocState},
|
||||
};
|
||||
use crate::node::listener::connection_handler::packet_processing::PacketProcessor;
|
||||
use crate::node::listener::connection_handler::ConnectionHandler;
|
||||
@@ -16,7 +16,7 @@ use crate::node::node_statistics::NodeStatsWrapper;
|
||||
use crate::node::packet_delayforwarder::{DelayForwarder, PacketDelayForwardSender};
|
||||
use crypto::asymmetric::{encryption, identity};
|
||||
use log::{error, info, warn};
|
||||
use mixnode_common::rtt_measurement::{self, AtomicVerlocResult, RttMeasurer};
|
||||
use mixnode_common::verloc::{self, AtomicVerlocResult, RttMeasurer};
|
||||
use std::net::SocketAddr;
|
||||
use std::process;
|
||||
use std::sync::Arc;
|
||||
@@ -70,7 +70,7 @@ impl MixNode {
|
||||
tokio::spawn(async move {
|
||||
rocket::build()
|
||||
.configure(config)
|
||||
.mount("/", routes![verloc, description, stats])
|
||||
.mount("/", routes![verlocRoute, description, stats])
|
||||
.register("/", catchers![not_found])
|
||||
.manage(verloc_state)
|
||||
.manage(descriptor)
|
||||
@@ -143,7 +143,7 @@ impl MixNode {
|
||||
// if this code exists in the node, it MUST BE compatible
|
||||
let config_version =
|
||||
parse_version(self.config.get_version()).expect("malformed version in the config file");
|
||||
let minimum_version = parse_version(rtt_measurement::MINIMUM_NODE_VERSION).unwrap();
|
||||
let minimum_version = parse_version(verloc::MINIMUM_NODE_VERSION).unwrap();
|
||||
if config_version < minimum_version {
|
||||
error!("You seem to have not updated your mixnode configuration file - please run `upgrade` before attempting again");
|
||||
process::exit(1)
|
||||
@@ -153,10 +153,10 @@ impl MixNode {
|
||||
|
||||
let listening_address = SocketAddr::new(
|
||||
self.config.get_listening_address(),
|
||||
rtt_measurement::DEFAULT_MEASUREMENT_PORT,
|
||||
verloc::DEFAULT_MEASUREMENT_PORT,
|
||||
);
|
||||
|
||||
let config = rtt_measurement::ConfigBuilder::new()
|
||||
let config = verloc::ConfigBuilder::new()
|
||||
.listening_address(listening_address)
|
||||
.packets_per_node(self.config.get_measurement_packets_per_node())
|
||||
.connection_timeout(self.config.get_measurement_connection_timeout())
|
||||
|
||||
Reference in New Issue
Block a user