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

chore(node): set gossipsub heartbeat interval to 5secs instead of 1sec #978

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions sn_networking/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ impl NetworkBuilder {
sha3.finalize(&mut msg_id);
msg_id.into()
})
// set the heartbeat interval to be higher than default 1sec
.heartbeat_interval(Duration::from_secs(5))
.build()
.map_err(|err| Error::GossipsubConfigError(err.to_string()))?;

Expand Down
4 changes: 2 additions & 2 deletions sn_node/tests/nodes_rewards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ fn current_rewards_balance() -> Result<NanoTokens> {
let path = entry?.path();
let wallet = LocalWallet::try_load_from(&path)?;
let balance = wallet.balance();
println!("Node's wallet {path:?} currently have balance of {balance:?}");

total_rewards = total_rewards
.checked_add(balance)
.ok_or_else(|| eyre!("Faied to sum up rewards balance"))?;
Expand Down Expand Up @@ -342,7 +342,7 @@ fn spawn_royalties_payment_client_listener(
let handle = tokio::spawn(async move {
let mut count = 0;

let duration = Duration::from_secs(20);
let duration = Duration::from_secs(40);
println!("Awaiting transfers notifs for {duration:?}...");
if timeout(duration, async {
while let Ok(event) = events_receiver.recv().await {
Expand Down