async fn handle_get(
        &self,
        sgd_hash: ai_hash::AnySgdHash,
        options: aingle_p2p::event::GetOptions,
    ) -> CellResult<WireOps> {
        debug!("handling get");
        // TODO: Later we will need more get types but for now
        // we can just have these defaults depending on whether or not
        // the hash is an entry or header.
        // In the future we should use GetOptions to choose which get to run.
        let mut r = match *sgd_hash.hash_type() {
            AnySgd::Entry => self
                .handle_get_entry(sgd_hash.into(), options)
                .await
                .map(WireOps::Entry),
            AnySgd::Header => self
                .handle_get_element(sgd_hash.into(), options)
                .await
                .map(WireOps::Element),
        };
        if let Err(e) = &mut r {
            error!(msg = "Error handling a get", ?e, agent = ?self.id.agent_pubkey());
        }
        r
    }
/// a remote node is asking us for entry data
a remote node is asking us for entry data
a remote node is asking us for entry data
async fn handle_get(
        &self,
        sgd_hash: ai_hash::AnySgdHash,
        options: aingle_p2p::event::GetOptions,
    ) -> CellResult<WireOps> {
        debug!("handling get");
        // TODO: Later we will need more get types but for now
        // we can just have these defaults depending on whether or not
        // the hash is an entry or header.
        // In the future we should use GetOptions to choose which get to run.
        let mut r = match *sgd_hash.hash_type() {
            AnySgd::Entry => self
                .handle_get_entry(sgd_hash.into(), options)
                .await
                .map(WireOps::Entry),
            AnySgd::Header => self
                .handle_get_element(sgd_hash.into(), options)
                .await
                .map(WireOps::Element),
        };
        if let Err(e) = &mut r {
            error!(msg = "Error handling a get", ?e, agent = ?self.id.agent_pubkey());
        }
        r
    }
async fn handle_get ( & self , sgd_hash : ai_hash :: AnySgdHash , options : aingle_p2p :: event :: GetOptions , ) -> CellResult < WireOps > { debug ! ( " " ) ; // TODO: Later we will need more get types but for now // we can just have these defaults depending on whether or not // the hash is an entry or header. // In the future we should use GetOptions to choose which get to run. let mut r = match * sgd_hash . hash_type ( ) { AnySgd :: Entry => self . handle_get_entry ( sgd_hash . into ( ) , options ) . await . map ( WireOps :: Entry ) , AnySgd :: Header => self . handle_get_element ( sgd_hash . into ( ) , options ) . await . map ( WireOps :: Element ) , } ; if let Err ( e ) = & mut r { error ! ( msg " " e agent self id agent_pubkey ( ) ) ; } r }
a remote node is asking us for entry data
a remote node is asking us for entry data
&self
sgd_hash
ai_hash::AnySgdHash
options
aingle_p2p::event::GetOptions
&self
sgd_hash
ai_hash::AnySgdHash
options
aingle_p2p::event::GetOptions