fix: dns and file errors (#67)

This commit is contained in:
Noah Citron 2022-10-05 16:06:15 -04:00 committed by GitHub
parent edfa536987
commit 98420e5d63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -128,8 +128,9 @@ impl<R: Rpc> Evm<R> {
let mut account_map = HashMap::new();
accounts.iter().for_each(|account| {
let addr = account.0;
let account = account.1.as_ref().unwrap().clone();
account_map.insert(addr, account);
if let Ok(account) = &account.1 {
account_map.insert(addr, account.clone());
}
});
Ok(account_map)

View File

@ -32,8 +32,8 @@ impl Clone for HttpRpc {
impl Rpc for HttpRpc {
fn new(rpc: &str) -> Result<Self> {
let http = Http::from_str(rpc)?;
let mut client = RetryClient::new(http, Box::new(HttpRateLimitRetryPolicy), 100, 10);
client.set_compute_units(250);
let mut client = RetryClient::new(http, Box::new(HttpRateLimitRetryPolicy), 100, 250);
client.set_compute_units(100);
let provider = Provider::new(client);
Ok(HttpRpc {
url: rpc.to_string(),