/// This handler is called when requests arrive from the various streams
This handler is called when requests arrive from the various streams
This handler is called when requests arrive from the various streams
async fn handle_request(
        &mut self,
        request: BaseNodeServiceRequest,
    ) -> Result<BaseNodeServiceResponse, BaseNodeServiceError>
    {
        debug!(
            target: LOG_TARGET,
            "Handling Wallet Base Node Service Request: {:?}", request
        );
        match request {
            BaseNodeServiceRequest::SetBaseNodePublicKey(public_key) => {
                self.set_base_node_public_key(public_key);
                Ok(BaseNodeServiceResponse::BaseNodePublicKeySet)
            },
            BaseNodeServiceRequest::GetChainMetadata => Ok(BaseNodeServiceResponse::ChainMetadata(
                self.state.chain_metadata.clone(),
            )),
        }
    }
async fn handle_request ( & mut self , request : BaseNodeServiceRequest , ) -> Result < BaseNodeServiceResponse , BaseNodeServiceError > { debug ! ( target LOG_TARGET " " request ) ; match request { BaseNodeServiceRequest :: SetBaseNodePublicKey ( public_key ) => { self . set_base_node_public_key ( public_key ) ; Ok ( BaseNodeServiceResponse :: BaseNodePublicKeySet ) } , BaseNodeServiceRequest :: GetChainMetadata => Ok ( BaseNodeServiceResponse :: ChainMetadata ( self . state . chain_metadata . clone ( ) , ) ) , } }
This handler is called when requests arrive from the various streams
This handler is called when requests arrive from the various streams
&mut self
request
BaseNodeServiceRequest