update next tx seq

This commit is contained in:
Peter Zhang 2024-09-02 10:43:04 +08:00
parent e75f58c1ee
commit b82183bf09

View File

@ -1,6 +1,6 @@
use ethers::prelude::{Filter, JsonRpcClient, Log, Middleware, Provider, ProviderError, U64}; use ethers::prelude::{Filter, JsonRpcClient, Log, Middleware, Provider, ProviderError, U64};
use futures_core::stream::Stream; use futures_core::stream::Stream;
use jsonrpsee::tracing::trace; use jsonrpsee::tracing::{error, trace};
use std::future::Future; use std::future::Future;
use std::time::Duration; use std::time::Duration;
use std::{ use std::{
@ -163,6 +163,10 @@ where
if err.to_string().contains(msg) { if err.to_string().contains(msg) {
self.from_block = *from_block; self.from_block = *from_block;
self.page_size /= 2; self.page_size /= 2;
error!(
"log_query: page size to large at {} reducing page size to {}",
self.from_block.unwrap(), self.page_size
);
rewake_with_new_state!(ctx, self, LogQueryState::Consume); rewake_with_new_state!(ctx, self, LogQueryState::Consume);
} }
} }