@@ -4,7 +4,6 @@ use futures::prelude::*;
4
4
use lazy_static:: lazy_static;
5
5
use std:: collections:: HashSet ;
6
6
use std:: iter:: FromIterator ;
7
- use std:: pin:: Pin ;
8
7
use std:: sync:: Arc ;
9
8
use std:: time:: Instant ;
10
9
@@ -13,8 +12,8 @@ use graph::components::ethereum::{EthereumAdapter as EthereumAdapterTrait, *};
13
12
use graph:: prelude:: {
14
13
debug, err_msg, error, ethabi, format_err,
15
14
futures03:: { self , compat:: Future01CompatExt , FutureExt , StreamExt , TryStreamExt } ,
16
- hex, retry, stream, tiny_keccak, trace, warn, web3, ChainStore , Error , EthereumCallCache ,
17
- Logger , TimeoutError ,
15
+ hex, retry, stream, tiny_keccak, trace, warn, web3, ChainStore , DynTryFuture , Error ,
16
+ EthereumCallCache , Logger , TimeoutError ,
18
17
} ;
19
18
use web3:: api:: Web3 ;
20
19
use web3:: transports:: batch:: Batch ;
@@ -260,7 +259,7 @@ where
260
259
from : u64 ,
261
260
to : u64 ,
262
261
filter : EthGetLogsFilter ,
263
- ) -> Pin < Box < dyn std :: future :: Future < Output = Result < Vec < Log > , Error > > + Send > > {
262
+ ) -> DynTryFuture < ' static , Vec < Log > , Error > {
264
263
// Codes returned by Ethereum node providers if an eth_getLogs request is too heavy.
265
264
// The first one is for Infura when it hits the log limit, the rest for Alchemy timeouts.
266
265
const TOO_MANY_LOGS_FINGERPRINTS : & [ & str ] = & [
@@ -1035,18 +1034,18 @@ where
1035
1034
from : u64 ,
1036
1035
to : u64 ,
1037
1036
log_filter : EthereumLogFilter ,
1038
- ) -> Box < dyn std :: future :: Future < Output = Result < Vec < Log > , Error > > + Send + Unpin > {
1037
+ ) -> DynTryFuture < ' static , Vec < Log > , Error > {
1039
1038
let eth: Self = self . clone ( ) ;
1040
1039
let logger = logger. clone ( ) ;
1041
- Box :: new (
1042
- futures03:: stream:: iter ( log_filter. eth_get_logs_filters ( ) . map ( move |filter| {
1043
- eth. clone ( )
1044
- . log_stream ( logger. clone ( ) , subgraph_metrics. clone ( ) , from, to, filter)
1045
- . into_stream ( )
1046
- } ) )
1047
- . flatten ( )
1048
- . try_concat ( ) ,
1049
- )
1040
+
1041
+ futures03:: stream:: iter ( log_filter. eth_get_logs_filters ( ) . map ( move |filter| {
1042
+ eth. clone ( )
1043
+ . log_stream ( logger. clone ( ) , subgraph_metrics. clone ( ) , from, to, filter)
1044
+ . into_stream ( )
1045
+ } ) )
1046
+ . flatten ( )
1047
+ . try_concat ( )
1048
+ . boxed ( )
1050
1049
}
1051
1050
1052
1051
fn calls_in_block_range (
0 commit comments