Skip to content

Commit

Permalink
chore: make connection_options.antientropy_retry configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kantai committed Jun 29, 2024
1 parent 35d0840 commit 0f000c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion testnet/stacks-node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2389,6 +2389,7 @@ pub struct ConnectionOptionsFile {
pub antientropy_public: Option<bool>,
pub private_neighbors: Option<bool>,
pub block_proposal_token: Option<String>,
pub antientropy_retry: Option<u64>,
}

impl ConnectionOptionsFile {
Expand Down Expand Up @@ -2420,6 +2421,7 @@ impl ConnectionOptionsFile {
self.read_only_call_limit_runtime.map(|x| {
read_only_call_limit.runtime = x;
});
let default = ConnectionOptions::default();
Ok(ConnectionOptions {
read_only_call_limit,
inbox_maxlen: self
Expand Down Expand Up @@ -2513,7 +2515,8 @@ impl ConnectionOptionsFile {
antientropy_public: self.antientropy_public.unwrap_or(true),
private_neighbors: self.private_neighbors.unwrap_or(true),
block_proposal_token: self.block_proposal_token,
..ConnectionOptions::default()
antientropy_retry: self.antientropy_retry.unwrap_or(default.antientropy_retry),
..default
})
}
}
Expand Down

0 comments on commit 0f000c9

Please sign in to comment.