turns out 'make' doesn't run cargo fmt
This commit is contained in:
@@ -8,7 +8,6 @@ use nym_sphinx::addressing::clients::Recipient;
|
||||
use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
// local text equivalent of `ClientRequest` for easier serialization + deserialization with serde
|
||||
// TODO: figure out if there's an easy way to avoid defining it
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ use cosmrs::{AccountId, Any, Coin as CosmosCoin};
|
||||
use prost::Message;
|
||||
use serde::Serialize;
|
||||
|
||||
|
||||
pub use cosmrs::abci::GasInfo;
|
||||
|
||||
pub type ContractCodeId = u64;
|
||||
|
||||
@@ -96,7 +96,7 @@ impl Display for MixnetEventType {
|
||||
MixnetEventType::GatewayConfigUpdate => "gateway_config_update",
|
||||
};
|
||||
|
||||
write!(f,"{EVENT_VERSION_PREFIX}{event_name}")
|
||||
write!(f, "{EVENT_VERSION_PREFIX}{event_name}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -596,7 +596,6 @@ mod tests {
|
||||
#[test]
|
||||
#[allow(clippy::inconsistent_digit_grouping)]
|
||||
fn multiple_nodes_against_known_values() {
|
||||
|
||||
// TODO: this test can be further improved by checking values after EVERY interval
|
||||
// rather than just checking the final results
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
use crate::verloc::error::RttError;
|
||||
use nym_crypto::asymmetric::identity::{self, PUBLIC_KEY_LENGTH, SIGNATURE_LENGTH};
|
||||
|
||||
|
||||
pub(crate) struct EchoPacket {
|
||||
sequence_number: u64,
|
||||
sender: identity::PublicKey,
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
use core::ops::{Deref, Mul};
|
||||
|
||||
|
||||
|
||||
use bls12_381::{G1Projective, Scalar};
|
||||
use group::Curve;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
use std::borrow::Borrow;
|
||||
|
||||
|
||||
use bls12_381::{G1Projective, G2Projective, Scalar};
|
||||
use digest::generic_array::typenum::Unsigned;
|
||||
use digest::Digest;
|
||||
|
||||
@@ -7,7 +7,6 @@ use crate::utils::try_deserialize_g2_projective;
|
||||
use bls12_381::{G2Affine, G2Projective};
|
||||
use group::Curve;
|
||||
|
||||
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::ops::Deref;
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
|
||||
use std::ops::Neg;
|
||||
|
||||
use bls12_381::{multi_miller_loop, G1Affine, G1Projective, G2Prepared, Scalar};
|
||||
|
||||
@@ -5,8 +5,6 @@ use core::borrow::Borrow;
|
||||
use core::iter::Sum;
|
||||
use core::ops::{Add, Mul};
|
||||
|
||||
|
||||
|
||||
use bls12_381::{G1Projective, G2Projective, Scalar};
|
||||
use group::Curve;
|
||||
use nym_pemstore::traits::{PemStorableKey, PemStorableKeyPair};
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
|
||||
// TODO: implement https://crates.io/crates/signature traits?
|
||||
|
||||
|
||||
|
||||
|
||||
use bls12_381::{G1Projective, G2Prepared, G2Projective, Scalar};
|
||||
use group::Curve;
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ use bls12_381::{multi_miller_loop, G1Affine, G2Prepared, G2Projective, Scalar};
|
||||
use core::ops::Neg;
|
||||
use group::{Curve, Group};
|
||||
|
||||
|
||||
|
||||
pub use crate::scheme::double_use::BlindedSerialNumber;
|
||||
|
||||
// TODO NAMING: this whole thing
|
||||
|
||||
@@ -8,7 +8,6 @@ use crate::CoconutError;
|
||||
use bls12_381::{G1Affine, G1Projective, Scalar};
|
||||
use group::GroupEncoding;
|
||||
|
||||
|
||||
pub trait Bytable
|
||||
where
|
||||
Self: Sized,
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
use core::iter::Sum;
|
||||
use core::ops::Mul;
|
||||
|
||||
|
||||
use bls12_381::hash_to_curve::{ExpandMsgXmd, HashToCurve, HashToField};
|
||||
use bls12_381::{G1Affine, G1Projective, G2Affine, G2Projective, Scalar};
|
||||
use ff::Field;
|
||||
|
||||
@@ -241,7 +241,7 @@ mod packet_encoding {
|
||||
mod decode_will_allocate_enough_bytes_for_next_call {
|
||||
use super::*;
|
||||
use nym_sphinx_params::packet_version::PacketVersion;
|
||||
|
||||
|
||||
#[test]
|
||||
fn for_empty_bytes() {
|
||||
// empty bytes should allocate for header + ack packet
|
||||
|
||||
@@ -8,7 +8,6 @@ use nym_sphinx_params::packet_version::PacketVersion;
|
||||
use nym_sphinx_params::PacketType;
|
||||
use nym_sphinx_types::NymPacket;
|
||||
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FramedNymPacket {
|
||||
/// Contains any metadata helping receiver to handle the underlying packet.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
|
||||
|
||||
use self::types::SocksProxyError;
|
||||
|
||||
pub mod authentication;
|
||||
|
||||
@@ -17,7 +17,6 @@ use std::collections::BTreeMap;
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
#[cfg(feature = "wasm-serde-types")]
|
||||
use tsify::Tsify;
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ impl TryFrom<DecCoin> for Coin {
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
|
||||
|
||||
#[test]
|
||||
fn dec_value_scale_down() {
|
||||
let dec = DecCoin {
|
||||
|
||||
@@ -1983,8 +1983,8 @@ mod tests {
|
||||
|
||||
#[cfg(test)]
|
||||
mod changing_mix_cost_params {
|
||||
use cosmwasm_std::coin;
|
||||
use crate::support::tests::fixtures::TEST_COIN_DENOM;
|
||||
use cosmwasm_std::coin;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -500,9 +500,7 @@ pub mod tests {
|
||||
use cosmwasm_std::{Order, StdResult, Uint128};
|
||||
|
||||
use mixnet_contract_common::mixnode::PendingMixNodeChanges;
|
||||
use mixnet_contract_common::{
|
||||
EpochState, EpochStatus, ExecuteMsg, LayerDistribution, Percent,
|
||||
};
|
||||
use mixnet_contract_common::{EpochState, EpochStatus, ExecuteMsg, LayerDistribution, Percent};
|
||||
|
||||
use crate::contract::execute;
|
||||
use crate::mixnet_contract_settings::storage::minimum_mixnode_pledge;
|
||||
|
||||
@@ -411,7 +411,6 @@ mod tests {
|
||||
use crate::support::tests::test_helpers::get_bank_send_msg;
|
||||
use cosmwasm_std::testing::mock_info;
|
||||
|
||||
|
||||
#[test]
|
||||
fn for_non_existent_delegation() {
|
||||
let test = TestSetup::new();
|
||||
|
||||
@@ -11,7 +11,6 @@ use nym_crypto::asymmetric::identity;
|
||||
use nym_types::helpers::ConsoleSigningOutput;
|
||||
use nym_validator_client::nyxd;
|
||||
|
||||
|
||||
use super::version_check;
|
||||
|
||||
#[derive(Args, Clone)]
|
||||
|
||||
@@ -73,7 +73,6 @@ pub trait Client {
|
||||
dealing_index: DealingIndex,
|
||||
) -> Result<DealingStatusResponse>;
|
||||
|
||||
|
||||
async fn get_current_dealers(&self) -> Result<Vec<DealerDetails>>;
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
@@ -125,7 +125,8 @@ impl<R: RngCore + CryptoRng> DkgController<R> {
|
||||
// update the state with the dealing information
|
||||
self.state
|
||||
.dealing_exchange_state_mut(epoch_id)?
|
||||
.generated_dealings.clone_from(&dealings);
|
||||
.generated_dealings
|
||||
.clone_from(&dealings);
|
||||
|
||||
Ok(dealings)
|
||||
}
|
||||
|
||||
@@ -234,7 +234,10 @@ impl<R: RngCore + CryptoRng> DkgController<R> {
|
||||
}
|
||||
|
||||
let votes = self.generate_votes(epoch_id).await?;
|
||||
self.state.key_validation_state_mut(epoch_id)?.votes.clone_from(&votes);
|
||||
self.state
|
||||
.key_validation_state_mut(epoch_id)?
|
||||
.votes
|
||||
.clone_from(&votes);
|
||||
|
||||
// send the votes
|
||||
for (proposal, vote) in votes {
|
||||
|
||||
@@ -8,7 +8,6 @@ use crate::support::storage::models::{
|
||||
};
|
||||
use nym_mixnet_contract_common::{EpochId, IdentityKey, MixId};
|
||||
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct StorageManager {
|
||||
pub(crate) connection_pool: sqlx::SqlitePool,
|
||||
|
||||
@@ -63,8 +63,6 @@ use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE;
|
||||
use curve25519_dalek::montgomery::MontgomeryPoint;
|
||||
use curve25519_dalek::scalar::Scalar;
|
||||
|
||||
|
||||
|
||||
use std::ops::Range;
|
||||
use std::u8;
|
||||
|
||||
@@ -79,7 +77,6 @@ use crate::constants::TAGBYTES;
|
||||
use crate::error::OutfoxError;
|
||||
use crate::lion::*;
|
||||
|
||||
|
||||
/// A structure that holds mix packet construction parameters. These incluse the length
|
||||
/// of the routing information at each hop, the number of hops, and the payload length.
|
||||
#[derive(Eq, PartialEq, Debug)]
|
||||
@@ -318,7 +315,6 @@ impl MixStageParameters {
|
||||
mod test {
|
||||
use super::MixCreationParameters;
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_to_bytes() {
|
||||
let mix_params = MixCreationParameters::new(1024);
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
use std::{
|
||||
array::TryFromSliceError,
|
||||
collections::VecDeque,
|
||||
ops::Range,
|
||||
};
|
||||
use std::{array::TryFromSliceError, collections::VecDeque, ops::Range};
|
||||
|
||||
use crate::{
|
||||
constants::{DEFAULT_HOPS, MAGIC_SLICE, MIN_PACKET_SIZE, MIX_PARAMS_LEN},
|
||||
|
||||
Reference in New Issue
Block a user