pub fn send_transaction(
    client: &BlockingClient,
    tx: diem_types::transaction::SignedTransaction,
) -> Result<()> {
    use diem_json_rpc_types::views::VMStatusView;

    client.submit(&tx)?;
    let status = client
        .wait_for_signed_transaction(&tx, Some(std::time::Duration::from_secs(60)), None)?
        .into_inner()
        .vm_status;
    if status != VMStatusView::Executed {
        return Err(anyhow::anyhow!("transaction execution failed: {}", status));
    }
    Ok(())
}
/// Send a transaction to the blockchain through the blocking client.
Send a transaction to the blockchain through the blocking client.
Send a transaction to the blockchain through the blocking client .
pub fn send_transaction(
    client: &BlockingClient,
    tx: diem_types::transaction::SignedTransaction,
) -> Result<()> {
    use diem_json_rpc_types::views::VMStatusView;
    client.submit(&tx)?;
    let status = client
        .wait_for_signed_transaction(&tx, Some(std::time::Duration::from_secs(60)), None)?
        .into_inner()
        .vm_status;
    if status != VMStatusView::Executed {
        return Err(anyhow::anyhow!("transaction execution failed: {}", status));
    }
    Ok(())
}
pub fn send_transaction ( client : & BlockingClient , tx : diem_types :: transaction :: SignedTransaction , ) -> Result < ( ) > { use diem_json_rpc_types :: views :: VMStatusView ; client . submit ( & tx ) ? ; let status = client . wait_for_signed_transaction ( & tx , Some ( std :: time :: Duration :: from_secs ( 60 ) ) , None ) ? . into_inner ( ) . vm_status ; if status != VMStatusView :: Executed { return Err ( anyhow :: anyhow ! ( " " status ) ) ; } Ok ( ( ) ) }
Send a transaction to the blockchain through the blocking client.
Send a transaction to the blockchain through the blocking client .
client
&BlockingClient
tx
diem_types::transaction::SignedTransaction
client
&BlockingClient
tx
diem_types::transaction::SignedTransaction