Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3 committed Dec 19, 2024
1 parent fb59ad3 commit 15c2983
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
12 changes: 6 additions & 6 deletions roles/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions roles/tests-integration/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,16 @@ pub async fn start_sv2_translator(upstream: SocketAddr) -> SocketAddr {
downstream_difficulty_config,
);

let config =
translator_sv2::proxy_config::ProxyConfig::new(upstream_conf, downstream_conf, 2, 2, 8);
let min_extranonce2_size = 5;
let min_version = 5;
let max_version = 5;
let config = translator_sv2::proxy_config::ProxyConfig::new(
upstream_conf,
downstream_conf,
max_version,
min_version,
min_extranonce2_size,
);
let translator_v2 = translator_sv2::TranslatorSv2::new(config);
tokio::spawn(async move {
translator_v2.start().await;
Expand Down
16 changes: 10 additions & 6 deletions roles/tests-integration/tests/translator_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ async fn translation_proxy() {
&pool_translator_sniffer.next_message_from_upstream(),
NewExtendedMiningJob
);
pool_translator_sniffer
.wait_for_message_type(
MessageDirection::ToUpstream,
MESSAGE_TYPE_SUBMIT_SHARES_EXTENDED,
)
.await;
//panic!("Not yet implemented");
tokio::task::spawn(async move {
pool_translator_sniffer
.wait_for_message_type(
MessageDirection::ToUpstream,
MESSAGE_TYPE_SUBMIT_SHARES_EXTENDED,
)
.await;
});
tokio::time::sleep(std::time::Duration::from_millis(10000)).await;
}

0 comments on commit 15c2983

Please sign in to comment.