pub async fn reattach_unchecked(&self, message_id: &MessageId) -> Result<(MessageId, Message)> {
        // Get the Message object by the MessageID.
        let message = self.get_message().data(message_id).await?;
        let reattach_message = {
            #[cfg(feature = "wasm")]
            {
                let network_id = self.get_network_id().await?;
                let mut tips = self.get_tips().await?;
                tips.sort_unstable_by_key(|a| a.pack_new());
                tips.dedup();
                let mut message_builder = MessageBuilder::<ClientMiner>::new()
                    .with_network_id(network_id)
                    .with_parents(Parents::new(tips)?);
                if let Some(p) = message.payload().to_owned() {
                    message_builder = message_builder.with_payload(p)
                }
                message_builder.finish().map_err(Error::MessageError)?
            }
            #[cfg(not(feature = "wasm"))]
            {
                finish_pow(self, message.payload().to_owned()).await?
            }
        };

        // Post the modified
        let message_id = self.post_message(&reattach_message).await?;
        // Get message if we use remote PoW, because the node will change parents and nonce
        let msg = match self.get_local_pow().await {
            true => reattach_message,
            false => self.get_message().data(&message_id).await?,
        };
        Ok((message_id, msg))
    }
/// Reattach a message without checking if it should be reattached
Reattach a message without checking if it should be reattached
Reattach a message without checking if it should be reattached
pub async fn reattach_unchecked(&self, message_id: &MessageId) -> Result<(MessageId, Message)> {
        // Get the Message object by the MessageID.
        let message = self.get_message().data(message_id).await?;
        let reattach_message = {
            #[cfg(feature = "wasm")]
            {
                let network_id = self.get_network_id().await?;
                let mut tips = self.get_tips().await?;
                tips.sort_unstable_by_key(|a| a.pack_new());
                tips.dedup();
                let mut message_builder = MessageBuilder::<ClientMiner>::new()
                    .with_network_id(network_id)
                    .with_parents(Parents::new(tips)?);
                if let Some(p) = message.payload().to_owned() {
                    message_builder = message_builder.with_payload(p)
                }
                message_builder.finish().map_err(Error::MessageError)?
            }
            #[cfg(not(feature = "wasm"))]
            {
                finish_pow(self, message.payload().to_owned()).await?
            }
        };
        // Post the modified
        let message_id = self.post_message(&reattach_message).await?;
        // Get message if we use remote PoW, because the node will change parents and nonce
        let msg = match self.get_local_pow().await {
            true => reattach_message,
            false => self.get_message().data(&message_id).await?,
        };
        Ok((message_id, msg))
    }
pub async fn reattach_unchecked ( & self , message_id : & MessageId ) -> Result < ( MessageId , Message ) > { // Get the Message object by the MessageID. let message = self . get_message ( ) . data ( message_id ) . await ? ; let reattach_message = { # [ cfg ( feature " " ) ] { let network_id = self . get_network_id ( ) . await ? ; let mut tips = self . get_tips ( ) . await ? ; tips . sort_unstable_by_key ( | a | a . pack_new ( ) ) ; tips . dedup ( ) ; let mut message_builder = MessageBuilder :: < ClientMiner > :: new ( ) . with_network_id ( network_id ) . with_parents ( Parents :: new ( tips ) ? ) ; if let Some ( p ) = message . payload ( ) . to_owned ( ) { message_builder = message_builder . with_payload ( p ) } message_builder . finish ( ) . map_err ( Error :: MessageError ) ? } # [ cfg ( not ( feature " " ) ) ] { finish_pow ( self , message . payload ( ) . to_owned ( ) ) . await ? } } ; // Post the modified let message_id = self . post_message ( & reattach_message ) . await ? ; // Get message if we use remote PoW, because the node will change parents and nonce let msg = match self . get_local_pow ( ) . await { true => reattach_message , false => self . get_message ( ) . data ( & message_id ) . await ? , } ; Ok ( ( message_id , msg ) ) }
Reattach a message without checking if it should be reattached
Reattach a message without checking if it should be reattached
&self
message_id
&MessageId
&self
message_id
&MessageId