Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
SWvheerden committed Mar 20, 2023
1 parent 9b3a324 commit c2326f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion base_layer/p2p/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl TransportConfig {
}
}

#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)]
#[serde(deny_unknown_fields, rename_all = "snake_case")]
pub enum TransportType {
/// Memory transport. Supports a single address type in the form '/memory/x' and can only communicate in-process.
Expand Down
14 changes: 9 additions & 5 deletions base_layer/wallet_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ use tari_common_types::{
};
use tari_comms::{
multiaddr::Multiaddr,
peer_manager::{NodeIdentity, PeerFeatures},
peer_manager::NodeIdentity,
transports::MemoryTransport,
types::{CommsPublicKey, CommsSecretKey},
types::CommsPublicKey,
};
use tari_comms_dht::{store_forward::SafConfig, DbConnectionUrl, DhtConfig};
use tari_contacts::contacts_service::storage::database::Contact;
Expand Down Expand Up @@ -4769,12 +4769,15 @@ pub unsafe extern "C" fn comms_config_create(

match public_address {
Ok(public_address) => {
let node_identity =
NodeIdentity::new(CommsSecretKey::default(), vec![], PeerFeatures::COMMUNICATION_CLIENT);
let addresses = if (*transport).transport_type == TransportType::Tor {
vec![]
} else {
vec![public_address]
};

let config = TariCommsConfig {
override_from: None,
public_addresses: vec![],
public_addresses: addresses,
transport: (*transport).clone(),
auxiliary_tcp_listener_address: None,
datastore_path,
Expand Down Expand Up @@ -8419,6 +8422,7 @@ mod test {
use borsh::BorshSerialize;
use libc::{c_char, c_uchar, c_uint};
use tari_common_types::{emoji, transaction::TransactionStatus, types::PrivateKey};
use tari_comms::peer_manager::PeerFeatures;
use tari_core::{
covenant,
transactions::test_helpers::{create_test_input, create_unblinded_output, TestParams},
Expand Down

0 comments on commit c2326f3

Please sign in to comment.