fn log_in(&mut self) -> Result<(), String> {
        match self.stream {
            Some(ref mut stream) => {
                let login_params = LoginParams {
                    login: self.config.grin_node.login.clone().to_string(),
                    pass: self.config.grin_node.password.clone().to_string(),
                    agent: self.id.clone(),
                };
                let params_value = serde_json::to_value(login_params).unwrap();
                trace!("{} - Requesting Login", self.id);
                return self.protocol.send_request(
                    stream,
                    "login".to_string(),
                    Some(params_value),
                    Some(self.id.clone()),
                );
            }
            None => Err("No upstream connection".to_string()),
        }
    }
/// Send our login info to the upstream stratum server
Send our login info to the upstream stratum server
Send our login info to the upstream stratum server
fn log_in(&mut self) -> Result<(), String> {
        match self.stream {
            Some(ref mut stream) => {
                let login_params = LoginParams {
                    login: self.config.grin_node.login.clone().to_string(),
                    pass: self.config.grin_node.password.clone().to_string(),
                    agent: self.id.clone(),
                };
                let params_value = serde_json::to_value(login_params).unwrap();
                trace!("{} - Requesting Login", self.id);
                return self.protocol.send_request(
                    stream,
                    "login".to_string(),
                    Some(params_value),
                    Some(self.id.clone()),
                );
            }
            None => Err("No upstream connection".to_string()),
        }
    }
fn log_in ( & mut self ) -> Result < ( ) , String > { match self . stream { Some ( ref mut stream ) => { let login_params = LoginParams { login : self . config . grin_node . login . clone ( ) . to_string ( ) , pass : self . config . grin_node . password . clone ( ) . to_string ( ) , agent : self . id . clone ( ) , } ; let params_value = serde_json :: to_value ( login_params ) . unwrap ( ) ; trace ! ( " " self id ) ; return self . protocol . send_request ( stream , " " . to_string ( ) , Some ( params_value ) , Some ( self . id . clone ( ) ) , ) ; } None => Err ( " " . to_string ( ) ) , } }
Send our login info to the upstream stratum server
Send our login info to the upstream stratum server
&mut self