pub async fn submit_transaction(
        &mut self,
        transaction_broadcast_join_handles: &mut FuturesUnordered<
            JoinHandle<Result<u64, TransactionServiceProtocolError>>,
        >,
        tx_id: TxId,
        tx: Transaction,
        fee: MicroTari,
        amount: MicroTari,
        message: String,
    ) -> Result<(), TransactionServiceError>
    {
        trace!(target: LOG_TARGET, "Submit transaction ({}) to db.", tx_id);
        self.db
            .insert_completed_transaction(
                tx_id,
                CompletedTransaction::new(
                    tx_id,
                    self.node_identity.public_key().clone(),
                    self.node_identity.public_key().clone(),
                    amount,
                    fee,
                    tx,
                    TransactionStatus::Completed,
                    message,
                    Utc::now().naive_utc(),
                    TransactionDirection::Inbound,
                    None,
                ),
            )
            .await?;
        trace!(
            target: LOG_TARGET,
            "Launch the transaction broadcast protocol for submitted transaction ({}).",
            tx_id
        );
        self.complete_send_transaction_protocol(Ok(tx_id), transaction_broadcast_join_handles)
            .await;
        Ok(())
    }
/// Submit a completed transaction to the Transaction Manager
Submit a completed transaction to the Transaction Manager
Submit a completed transaction to the Transaction Manager
pub async fn submit_transaction(
        &mut self,
        transaction_broadcast_join_handles: &mut FuturesUnordered<
            JoinHandle<Result<u64, TransactionServiceProtocolError>>,
        >,
        tx_id: TxId,
        tx: Transaction,
        fee: MicroTari,
        amount: MicroTari,
        message: String,
    ) -> Result<(), TransactionServiceError>
    {
        trace!(target: LOG_TARGET, "Submit transaction ({}) to db.", tx_id);
        self.db
            .insert_completed_transaction(
                tx_id,
                CompletedTransaction::new(
                    tx_id,
                    self.node_identity.public_key().clone(),
                    self.node_identity.public_key().clone(),
                    amount,
                    fee,
                    tx,
                    TransactionStatus::Completed,
                    message,
                    Utc::now().naive_utc(),
                    TransactionDirection::Inbound,
                    None,
                ),
            )
            .await?;
        trace!(
            target: LOG_TARGET,
            "Launch the transaction broadcast protocol for submitted transaction ({}).",
            tx_id
        );
        self.complete_send_transaction_protocol(Ok(tx_id), transaction_broadcast_join_handles)
            .await;
        Ok(())
    }
pub async fn submit_transaction ( & mut self , transaction_broadcast_join_handles : & mut FuturesUnordered < JoinHandle < Result < u64 , TransactionServiceProtocolError > > , > , tx_id : TxId , tx : Transaction , fee : MicroTari , amount : MicroTari , message : String , ) -> Result < ( ) , TransactionServiceError > { trace ! ( target LOG_TARGET " " tx_id ) ; self . db . insert_completed_transaction ( tx_id , CompletedTransaction :: new ( tx_id , self . node_identity . public_key ( ) . clone ( ) , self . node_identity . public_key ( ) . clone ( ) , amount , fee , tx , TransactionStatus :: Completed , message , Utc :: now ( ) . naive_utc ( ) , TransactionDirection :: Inbound , None , ) , ) . await ? ; trace ! ( target LOG_TARGET " " tx_id ) ; self . complete_send_transaction_protocol ( Ok ( tx_id ) , transaction_broadcast_join_handles ) . await ; Ok ( ( ) ) }
Submit a completed transaction to the Transaction Manager
Submit a completed transaction to the Transaction Manager
&mut self
transaction_broadcast_join_handles
&mut FuturesUnordered<
            JoinHandle<Result<u64, TransactionServiceProtocolError>>,
        >
tx_id
TxId
tx
Transaction
fee
MicroTari
amount
MicroTari
message
String
&mut self
transaction_broadcast_join_handles
&mut FuturesUnordered<
            JoinHandle<Result<u64, TransactionServiceProtocolError>>,
        >
tx_id
TxId
tx
Transaction
fee
MicroTari
amount
MicroTari
message
String