Ver código fonte

Remove copied handle_request results

Janus 5 anos atrás
pai
commit
8ff94791b5
1 arquivos alterados com 0 adições e 35 exclusões
  1. 0 35
      src/service/bitcoin_bridge.rs

+ 0 - 35
src/service/bitcoin_bridge.rs

@@ -86,49 +86,14 @@ impl CashierService {
         let peer = msg.0;
         let peer = msg.0;
         match request.get_command() {
         match request.get_command() {
             0 => {
             0 => {
-                // PUTSLAB
 
 
-                let slab = request.get_payload();
 
 
-                // add to slabstore
-                let error = slabstore.put(deserialize(&slab)?)?;
-
-                let mut reply = Reply::from(&request, GatewayError::NoError as u32, vec![]);
-
-                if let None = error {
-                    reply.set_error(GatewayError::UpdateIndex as u32);
-                }
-
-                // send reply
-                send_queue.send((peer, reply)).await?;
-
-                info!("Received putslab msg");
             }
             }
             1 => {
             1 => {
-                let index = request.get_payload();
-                let slab = slabstore.get(index)?;
 
 
-                let mut reply = Reply::from(&request, GatewayError::NoError as u32, vec![]);
-
-                if let Some(payload) = slab {
-                    reply.set_payload(payload);
-                } else {
-                    reply.set_error(GatewayError::IndexNotExist as u32);
-                }
-
-                send_queue.send((peer, reply)).await?;
-
-                // GETSLAB
-                info!("Received getslab msg");
             }
             }
             2 => {
             2 => {
-                let index = slabstore.get_last_index_as_bytes()?;
-
-                let reply = Reply::from(&request, GatewayError::NoError as u32, index);
-                send_queue.send((peer, reply)).await?;
 
 
-                // GETLASTINDEX
-                info!("Received getlastindex msg");
             }
             }
             _ => {
             _ => {
                 return Err(Error::ServicesError("received wrong command"));
                 return Err(Error::ServicesError("received wrong command"));