From 2515bbd6bbe24fe53d67428a2d53e1e126a0288f Mon Sep 17 00:00:00 2001 From: cryptoAtwill Date: Wed, 18 Oct 2023 19:06:51 +0800 Subject: [PATCH] query event instead of stream --- ipc/provider/src/manager/evm/manager.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ipc/provider/src/manager/evm/manager.rs b/ipc/provider/src/manager/evm/manager.rs index e6405159..86bfaca4 100644 --- a/ipc/provider/src/manager/evm/manager.rs +++ b/ipc/provider/src/manager/evm/manager.rs @@ -30,7 +30,6 @@ use ethers::prelude::{Signer, SignerMiddleware}; use ethers::providers::{Authorization, Http, Middleware, Provider}; use ethers::signers::{LocalWallet, Wallet}; use ethers::types::{BlockId, Eip1559TransactionRequest, I256, U256}; -use futures_util::StreamExt; use fvm_shared::clock::ChainEpoch; use fvm_shared::{address::Address, econ::TokenAmount}; use ipc_identity::{EthKeyAddress, EvmKeyStore, PersistentKeyStore}; @@ -175,11 +174,10 @@ impl TopDownCheckpointQuery for EthSubnetManager { .event::() .from_block(epoch as u64) .to_block(epoch as u64); - let mut event_stream = ev.stream_with_meta().await?; let mut changes = vec![]; let mut hash = None; - while let Some(Ok((event, meta))) = event_stream.next().await { + for (event, meta) in ev.query_with_meta().await? { if let Some(h) = hash { if h != meta.block_hash { return Err(anyhow!("block hash not equal"));