@@ -32,8 +32,8 @@ use graph::{
32
32
web3:: {
33
33
self ,
34
34
types:: {
35
- BlockId , BlockNumber as Web3BlockNumber , Bytes , CallRequest , Filter , FilterBuilder ,
36
- Log , Transaction , TransactionReceipt , H256 ,
35
+ BlockId , Bytes , CallRequest , Filter , FilterBuilder , Log , Transaction ,
36
+ TransactionReceipt , H256 ,
37
37
} ,
38
38
} ,
39
39
BlockNumber , ChainStore , CheapClone , DynTryFuture , Error , EthereumCallCache , Logger ,
@@ -1319,32 +1319,6 @@ impl EthereumAdapterTrait for EthereumAdapter {
1319
1319
. await
1320
1320
}
1321
1321
1322
- async fn latest_block ( & self , logger : & Logger ) -> Result < LightEthereumBlock , IngestorError > {
1323
- let web3 = self . web3 . clone ( ) ;
1324
- retry ( "eth_getBlockByNumber(latest) with txs RPC call" , logger)
1325
- . redact_log_urls ( true )
1326
- . no_limit ( )
1327
- . timeout_secs ( ENV_VARS . json_rpc_timeout . as_secs ( ) )
1328
- . run ( move || {
1329
- let web3 = web3. cheap_clone ( ) ;
1330
- async move {
1331
- let block_opt = web3
1332
- . eth ( )
1333
- . block_with_txs ( Web3BlockNumber :: Latest . into ( ) )
1334
- . await
1335
- . map_err ( |e| anyhow ! ( "could not get latest block from Ethereum: {}" , e) ) ?;
1336
- block_opt
1337
- . ok_or_else ( || anyhow ! ( "no latest block returned from Ethereum" ) . into ( ) )
1338
- }
1339
- } )
1340
- . map_err ( move |e| {
1341
- e. into_inner ( ) . unwrap_or_else ( move || {
1342
- anyhow ! ( "Ethereum node took too long to return latest block" ) . into ( )
1343
- } )
1344
- } )
1345
- . await
1346
- }
1347
-
1348
1322
async fn load_block (
1349
1323
& self ,
1350
1324
logger : & Logger ,
0 commit comments