Skip to content

Commit 2115479

Browse files
authored
Merge pull request #461 from EspressoSystems/li/https-optional
Make Submitter https optional
2 parents 088a13f + f680fd2 commit 2115479

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

robusta/src/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ pub struct Config {
2222
/// The last value is repeated forever.
2323
#[builder(default = [1, 3, 5, 10, 15])]
2424
pub(crate) delays: [u8; NUM_DELAYS.get()],
25+
26+
/// Submitter should connect only with https?
27+
#[builder(default = true)]
28+
pub(crate) https_only: bool,
2529
}
2630

2731
impl Config {

robusta/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub struct Client {
3535
impl Client {
3636
pub fn new(c: Config) -> Self {
3737
let r = reqwest::Client::builder()
38-
.https_only(true)
38+
.https_only(c.https_only)
3939
.timeout(Duration::from_secs(30))
4040
.build()
4141
.expect("TLS and DNS resolver work");

timeboost-proto/protos

timeboost/src/binaries/timeboost.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,14 @@ struct Cli {
6464
#[clap(long, default_value = "wss://query.decaf.testnet.espresso.network/v1/")]
6565
espresso_websocket_url: Url,
6666

67+
/// Hotshot namespace for a chain
6768
#[clap(long)]
6869
namespace: u64,
6970

71+
/// Submitter should connect only with https?
72+
#[clap(long, default_value_t = true)]
73+
https_only: bool,
74+
7075
/// The until value to use for the committee config.
7176
#[cfg(feature = "until")]
7277
#[clap(long, default_value_t = 1000)]
@@ -215,6 +220,7 @@ async fn main() -> Result<()> {
215220
.base_url(cli.espresso_base_url)
216221
.wss_base_url(cli.espresso_websocket_url)
217222
.label(pubkey.to_string())
223+
.https_only(cli.https_only)
218224
.build(),
219225
Vec::new(),
220226
))

0 commit comments

Comments
 (0)