pub fn submit_share(
        &mut self,
        solution: &SubmitParams,
        worker_id: String,
    ) -> Result<(), String> {
        match self.stream {
            Some(ref mut stream) => {
                let params_value = serde_json::to_value(solution).unwrap();
                trace!("{} - Submitting a share", self.id);
                return self.protocol.send_request(
                    stream,
                    "submit".to_string(),
                    Some(params_value),
                    Some(self.id.clone()),
                );
            }
            None => Err("No upstream connection".to_string()),
        }
    }
/// Submit a workers share as a valid POW solution
Submit a workers share as a valid POW solution
Submit a workers share as a valid POW solution
pub fn submit_share(
        &mut self,
        solution: &SubmitParams,
        worker_id: String,
    ) -> Result<(), String> {
        match self.stream {
            Some(ref mut stream) => {
                let params_value = serde_json::to_value(solution).unwrap();
                trace!("{} - Submitting a share", self.id);
                return self.protocol.send_request(
                    stream,
                    "submit".to_string(),
                    Some(params_value),
                    Some(self.id.clone()),
                );
            }
            None => Err("No upstream connection".to_string()),
        }
    }
pub fn submit_share ( & mut self , solution : & SubmitParams , worker_id : String , ) -> Result < ( ) , String > { match self . stream { Some ( ref mut stream ) => { let params_value = serde_json :: to_value ( solution ) . unwrap ( ) ; trace ! ( " " self id ) ; return self . protocol . send_request ( stream , " " . to_string ( ) , Some ( params_value ) , Some ( self . id . clone ( ) ) , ) ; } None => Err ( " " . to_string ( ) ) , } }
Submit a workers share as a valid POW solution
Submit a workers share as a valid POW solution
&mut self
solution
&SubmitParams
worker_id
String