Skip to content

Commit

Permalink
Merge pull request stratum-mining#1080 from plebhash/patch-jdc-upstre…
Browse files Browse the repository at this point in the history
…am-setup-connection

JDC parse incoming mining messages from upstream after SetupConnection
  • Loading branch information
GitGab19 committed Aug 1, 2024
2 parents d495151 + df6b94a commit 61b5cf0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions roles/jd-client/src/lib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,6 @@ impl JobDeclaratorClient {
}
};

// Start receiving messages from the SV2 Upstream role
if let Err(e) = upstream_sv2::Upstream::parse_incoming(upstream.clone()) {
error!("failed to create sv2 parser: {}", e);
panic!()
}

match upstream_sv2::Upstream::setup_connection(
upstream.clone(),
proxy_config.min_supported_version,
Expand All @@ -281,6 +275,12 @@ impl JobDeclaratorClient {
}
}

// Start receiving messages from the SV2 Upstream role
if let Err(e) = upstream_sv2::Upstream::parse_incoming(upstream.clone()) {
error!("failed to create sv2 parser: {}", e);
panic!()
}

// Format `Downstream` connection address
let downstream_addr = SocketAddr::new(
IpAddr::from_str(&proxy_config.downstream_address).unwrap(),
Expand Down

0 comments on commit 61b5cf0

Please sign in to comment.