fix: dns and file errors (#67)
This commit is contained in:
parent
edfa536987
commit
98420e5d63
|
@ -128,8 +128,9 @@ impl<R: Rpc> Evm<R> {
|
||||||
let mut account_map = HashMap::new();
|
let mut account_map = HashMap::new();
|
||||||
accounts.iter().for_each(|account| {
|
accounts.iter().for_each(|account| {
|
||||||
let addr = account.0;
|
let addr = account.0;
|
||||||
let account = account.1.as_ref().unwrap().clone();
|
if let Ok(account) = &account.1 {
|
||||||
account_map.insert(addr, account);
|
account_map.insert(addr, account.clone());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Ok(account_map)
|
Ok(account_map)
|
||||||
|
|
|
@ -32,8 +32,8 @@ impl Clone for HttpRpc {
|
||||||
impl Rpc for HttpRpc {
|
impl Rpc for HttpRpc {
|
||||||
fn new(rpc: &str) -> Result<Self> {
|
fn new(rpc: &str) -> Result<Self> {
|
||||||
let http = Http::from_str(rpc)?;
|
let http = Http::from_str(rpc)?;
|
||||||
let mut client = RetryClient::new(http, Box::new(HttpRateLimitRetryPolicy), 100, 10);
|
let mut client = RetryClient::new(http, Box::new(HttpRateLimitRetryPolicy), 100, 250);
|
||||||
client.set_compute_units(250);
|
client.set_compute_units(100);
|
||||||
let provider = Provider::new(client);
|
let provider = Provider::new(client);
|
||||||
Ok(HttpRpc {
|
Ok(HttpRpc {
|
||||||
url: rpc.to_string(),
|
url: rpc.to_string(),
|
||||||
|
|
Loading…
Reference in New Issue