Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add default exclude dial #6607

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions base_layer/wallet/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,7 @@ where
target: LOG_TARGET,
"Transaction sending mechanism is {}", config.transaction_service_config.transaction_routing_mechanism
);
trace!(
target: LOG_TARGET,
"Wallet config: {:?}, {:?}, {:?}, buffer_size: {}",
config.base_node_service_config,
config.output_manager_service_config,
config.transaction_service_config,
config.buffer_size,
);
trace!(target: LOG_TARGET, "Wallet config: {:?}", config);
let stack = StackBuilder::new(shutdown_signal)
.add_initializer(P2pInitializer::new(
config.p2p.clone(),
Expand Down
2 changes: 1 addition & 1 deletion common/config/presets/c_base_node_c.toml
Original file line number Diff line number Diff line change
Expand Up @@ -319,4 +319,4 @@ database_url = "data/base_node/dht.db"
# `excluded_dial_addresses = ["/ip4/127.*.0:49.*/tcp/*", "/ip4/127.*.101:255.*/tcp/*"]`
# or
# `excluded_dial_addresses = ["/ip4/127.0:0.1/tcp/122", "/ip4/127.0:0.1/tcp/1000:2000"]`
#excluded_dial_addresses = []
excluded_dial_addresses = ["/ip4/127.*.*.*/tcp/*"]
2 changes: 1 addition & 1 deletion common/config/presets/d_console_wallet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -363,4 +363,4 @@ network_discovery.initial_peer_sync_delay = 25
# `excluded_dial_addresses = ["/ip4/127.*.0:49.*/tcp/*", "/ip4/127.*.101:255.*/tcp/*"]`
# or
# `excluded_dial_addresses = ["/ip4/127.0:0.1/tcp/122", "/ip4/127.0:0.1/tcp/1000:2000"]`
#excluded_dial_addresses = []
excluded_dial_addresses = ["/ip4/127.*.*.*/tcp/*"]
12 changes: 3 additions & 9 deletions comms/dht/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

use std::{path::Path, str::FromStr, time::Duration};
use std::{path::Path, time::Duration};

use serde::{Deserialize, Serialize};
use tari_common::configuration::serializers;
use tari_comms::{
net_address::{MultiaddrRange, MultiaddrRangeList, IP4_TCP_TEST_ADDR_RANGE},
peer_validator::PeerValidatorConfig,
};
use tari_comms::{net_address::MultiaddrRangeList, peer_validator::PeerValidatorConfig};

use crate::{
actor::OffenceSeverity,
Expand Down Expand Up @@ -202,10 +199,7 @@ impl Default for DhtConfig {
max_permitted_peer_claims: 5,
offline_peer_cooldown: Duration::from_secs(24 * 60 * 60),
peer_validator_config: Default::default(),
excluded_dial_addresses: vec![
MultiaddrRange::from_str(IP4_TCP_TEST_ADDR_RANGE).expect("should not fail static string")
]
.into(),
excluded_dial_addresses: vec![].into(),
}
}
}
Expand Down
Loading