Skip to content

Commit c79cb43

Browse files
committed
remove commented code
1 parent eb12c93 commit c79cb43

3 files changed

Lines changed: 2 additions & 30 deletions

File tree

src/translator/downstream/diff_management.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ impl Downstream {
8080
/// downstream and the bridge.
8181
pub async fn try_update_difficulty_settings(
8282
self_: &Arc<Mutex<Self>>,
83-
// last_notify: Option<Notify<'static>>,
8483
) -> ProxyResult<'static, ()> {
8584
let channel_id = self_
8685
.clone()
@@ -101,7 +100,6 @@ impl Downstream {
101100
self_: &Arc<Mutex<Self>>,
102101
channel_id: u32,
103102
new_diff: f64,
104-
// last_notify: Option<Notify<'static>>,
105103
) -> ProxyResult<'static, ()> {
106104
// Send messages downstream
107105
let (message, target) = diff_to_sv1_message(new_diff)?;

src/translator/upstream/upstream.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -347,23 +347,6 @@ impl Upstream {
347347
};
348348
Ok((diff_manager_handle.into(), main_loop_handle.into()))
349349
}
350-
// #[allow(clippy::result_large_err)]
351-
// fn get_job_id(self_: &Arc<Mutex<Self>>) -> Result<u32, super::super::error::Error<'static>> {
352-
// self_
353-
// .safe_lock(|s| {
354-
// if s.is_work_selection_enabled() {
355-
// s.last_job_id
356-
// .ok_or(super::super::error::Error::RolesSv2Logic(
357-
// RolesLogicError::NoValidTranslatorJob,
358-
// ))
359-
// } else {
360-
// s.job_id.ok_or(super::super::error::Error::RolesSv2Logic(
361-
// RolesLogicError::NoValidJob,
362-
// ))
363-
// }
364-
// })
365-
// .map_err(|_| Error::TranslatorUpstreamMutexPoisoned)?
366-
// }
367350

368351
fn handle_submit(
369352
self_: Arc<Mutex<Self>>,
@@ -402,15 +385,6 @@ impl Upstream {
402385

403386
sv2_submit.channel_id = channel_id;
404387

405-
// let job_id = match Self::get_job_id(&self_) {
406-
// Ok(job_id) => job_id,
407-
// Err(e) => {
408-
// error!("{e}");
409-
// return;
410-
// }
411-
// };
412-
// sv2_submit.job_id = job_id;
413-
414388
let message =
415389
roles_logic_sv2::parsers::Mining::SubmitSharesExtended(sv2_submit);
416390

src/translator/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ pub fn validate_share(
159159
);
160160

161161
hash.reverse(); //convert to little-endian
162-
println!("Hash: {:?}", hash.to_vec().as_hex());
162+
debug!("Hash: {:?}", hash.to_vec().as_hex());
163163
let target = Downstream::difficulty_to_target(difficulty);
164-
println!("Target: {:?}", target.to_vec().as_hex());
164+
debug!("Target: {:?}", target.to_vec().as_hex());
165165
hash <= target
166166
}
167167

0 commit comments

Comments
 (0)