pub async fn poll_for_tx(rpc_client: &rpc::HttpClient, tx_hash: tx::Hash) -> Tx {
    let attempts = 5;

    for _ in 0..attempts {
        // TODO(tarcieri): handle not found errors
        if let Ok(tx) = Tx::find_by_hash(rpc_client, tx_hash).await {
            return tx;
        }
    }

    panic!("couldn't find transaction after {} attempts!", attempts);
}
/// Wait for a transaction with the given hash to appear in the blockchain
Wait for a transaction with the given hash to appear in the blockchain
Wait for a transaction with the given hash to appear in the blockchain
pub async fn poll_for_tx(rpc_client: &rpc::HttpClient, tx_hash: tx::Hash) -> Tx {
    let attempts = 5;
    for _ in 0..attempts {
        // TODO(tarcieri): handle not found errors
        if let Ok(tx) = Tx::find_by_hash(rpc_client, tx_hash).await {
            return tx;
        }
    }
    panic!("couldn't find transaction after {} attempts!", attempts);
}
pub async fn poll_for_tx ( rpc_client : & rpc :: HttpClient , tx_hash : tx :: Hash ) -> Tx { let attempts = 5 ; for _ in 0 .. attempts { // TODO(tarcieri): handle not found errors if let Ok ( tx ) = Tx :: find_by_hash ( rpc_client , tx_hash ) . await { return tx ; } } panic ! ( " " attempts ) ; }
Wait for a transaction with the given hash to appear in the blockchain
Wait for a transaction with the given hash to appear in the blockchain
rpc_client
&rpc::HttpClient
tx_hash
tx::Hash
rpc_client
&rpc::HttpClient
tx_hash
tx::Hash