Last set of crates to add the nym- prefix to (#3286)

* Add nym- prefix to mixnode-common

* Add nym- prefix to mixnet-client

* Add nym-client- prefix to websocket-requests

* Makefile: add check target

* Rename to nym-credential-client

* rustfmt

* update to nym-credential-client in github workflow
This commit is contained in:
Jon Häggblad
2023-04-07 21:25:28 +02:00
committed by GitHub
parent 95e2e3d0d2
commit dc5c765ecb
24 changed files with 119 additions and 115 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
use mixnode_common::verloc::{AtomicVerlocResult, VerlocResult};
use nym_mixnode_common::verloc::{AtomicVerlocResult, VerlocResult};
use rocket::serde::json::Json;
use rocket::State;
@@ -7,7 +7,7 @@ use crate::node::listener::connection_handler::packet_processing::{
use crate::node::packet_delayforwarder::PacketDelayForwardSender;
use crate::node::TaskClient;
use futures::StreamExt;
use mixnode_common::measure;
use nym_mixnode_common::measure;
use nym_sphinx::forwarding::packet::MixPacket;
use nym_sphinx::framing::codec::SphinxCodec;
use nym_sphinx::framing::packet::FramedSphinxPacket;
@@ -2,10 +2,10 @@
// SPDX-License-Identifier: Apache-2.0
use crate::node::node_statistics;
use mixnode_common::packet_processor::error::MixProcessingError;
pub use mixnode_common::packet_processor::processor::MixProcessingResult;
use mixnode_common::packet_processor::processor::SphinxPacketProcessor;
use nym_crypto::asymmetric::encryption;
use nym_mixnode_common::packet_processor::error::MixProcessingError;
pub use nym_mixnode_common::packet_processor::processor::MixProcessingResult;
use nym_mixnode_common::packet_processor::processor::SphinxPacketProcessor;
use nym_sphinx::framing::packet::FramedSphinxPacket;
// PacketProcessor contains all data required to correctly unwrap and forward sphinx packets
+3 -3
View File
@@ -16,11 +16,11 @@ use crate::node::listener::Listener;
use crate::node::node_description::NodeDescription;
use crate::node::node_statistics::SharedNodeStats;
use crate::node::packet_delayforwarder::{DelayForwarder, PacketDelayForwardSender};
use mixnode_common::verloc::{self, AtomicVerlocResult, VerlocMeasurer};
use nym_bin_common::output_format::OutputFormat;
use nym_bin_common::version_checker::parse_version;
use nym_config::NymConfig;
use nym_crypto::asymmetric::{encryption, identity};
use nym_mixnode_common::verloc::{self, AtomicVerlocResult, VerlocMeasurer};
use nym_task::{TaskClient, TaskManager};
use rand::seq::SliceRandom;
use rand::thread_rng;
@@ -173,7 +173,7 @@ impl MixNode {
) -> PacketDelayForwardSender {
info!("Starting packet delay-forwarder...");
let client_config = mixnet_client::Config::new(
let client_config = nym_mixnet_client::Config::new(
self.config.get_packet_forwarding_initial_backoff(),
self.config.get_packet_forwarding_maximum_backoff(),
self.config.get_initial_connection_timeout(),
@@ -182,7 +182,7 @@ impl MixNode {
);
let mut packet_forwarder = DelayForwarder::new(
mixnet_client::Client::new(client_config),
nym_mixnet_client::Client::new(client_config),
node_stats_update_sender,
shutdown,
);
+3 -3
View File
@@ -21,7 +21,7 @@ type PacketDelayForwardReceiver = mpsc::UnboundedReceiver<(MixPacket, Option<Ins
/// Entity responsible for delaying received sphinx packet and forwarding it to next node.
pub(crate) struct DelayForwarder<C>
where
C: mixnet_client::SendWithoutResponse,
C: nym_mixnet_client::SendWithoutResponse,
{
delay_queue: NonExhaustiveDelayQueue<MixPacket>,
mixnet_client: C,
@@ -33,7 +33,7 @@ where
impl<C> DelayForwarder<C>
where
C: mixnet_client::SendWithoutResponse,
C: nym_mixnet_client::SendWithoutResponse,
{
pub(crate) fn new(
client: C,
@@ -150,7 +150,7 @@ mod tests {
pub packets_sent: Arc<Mutex<Vec<(NymNodeRoutingAddress, SphinxPacket, PacketMode)>>>,
}
impl mixnet_client::SendWithoutResponse for TestClient {
impl nym_mixnet_client::SendWithoutResponse for TestClient {
fn send_without_response(
&mut self,
address: NymNodeRoutingAddress,