Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
query event instead of stream
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoAtwill committed Oct 18, 2023
1 parent 8c2272b commit 2515bbd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ipc/provider/src/manager/evm/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -175,11 +174,10 @@ impl TopDownCheckpointQuery for EthSubnetManager {
.event::<NewStakingRequest>()
.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"));
Expand Down

0 comments on commit 2515bbd

Please sign in to comment.