@@ -1397,12 +1397,11 @@ impl EthereumAdapterTrait for EthereumAdapter {
1397
1397
. await
1398
1398
}
1399
1399
1400
- fn load_full_block (
1400
+ async fn load_full_block (
1401
1401
& self ,
1402
1402
logger : & Logger ,
1403
1403
block : LightEthereumBlock ,
1404
- ) -> Pin < Box < dyn std:: future:: Future < Output = Result < EthereumBlock , IngestorError > > + Send + ' _ > >
1405
- {
1404
+ ) -> Result < EthereumBlock , IngestorError > {
1406
1405
let web3 = Arc :: clone ( & self . web3 ) ;
1407
1406
let logger = logger. clone ( ) ;
1408
1407
let block_hash = block. hash . expect ( "block is missing block hash" ) ;
@@ -1411,36 +1410,29 @@ impl EthereumAdapterTrait for EthereumAdapter {
1411
1410
// request an empty batch which is not valid in JSON-RPC.
1412
1411
if block. transactions . is_empty ( ) {
1413
1412
trace ! ( logger, "Block {} contains no transactions" , block_hash) ;
1414
- return Box :: pin ( std :: future :: ready ( Ok ( EthereumBlock {
1413
+ return Ok ( EthereumBlock {
1415
1414
block : Arc :: new ( block) ,
1416
1415
transaction_receipts : Vec :: new ( ) ,
1417
- } ) ) ) ;
1416
+ } ) ;
1418
1417
}
1419
1418
let hashes: Vec < _ > = block. transactions . iter ( ) . map ( |txn| txn. hash ) . collect ( ) ;
1420
1419
1421
- let supports_block_receipts_future = self . check_block_receipt_support_and_update_cache (
1422
- web3. clone ( ) ,
1423
- block_hash,
1424
- self . supports_eip_1898 ,
1425
- self . call_only ,
1426
- logger. clone ( ) ,
1427
- ) ;
1420
+ let supports_block_receipts = self
1421
+ . check_block_receipt_support_and_update_cache (
1422
+ web3. clone ( ) ,
1423
+ block_hash,
1424
+ self . supports_eip_1898 ,
1425
+ self . call_only ,
1426
+ logger. clone ( ) ,
1427
+ )
1428
+ . await ;
1428
1429
1429
- let receipts_future = supports_block_receipts_future
1430
- . then ( move |supports_block_receipts| {
1431
- fetch_receipts_with_retry ( web3, hashes, block_hash, logger, supports_block_receipts)
1430
+ fetch_receipts_with_retry ( web3, hashes, block_hash, logger, supports_block_receipts)
1431
+ . await
1432
+ . map ( |transaction_receipts| EthereumBlock {
1433
+ block : Arc :: new ( block) ,
1434
+ transaction_receipts,
1432
1435
} )
1433
- . boxed ( ) ;
1434
-
1435
- let block_future =
1436
- futures03:: TryFutureExt :: map_ok ( receipts_future, move |transaction_receipts| {
1437
- EthereumBlock {
1438
- block : Arc :: new ( block) ,
1439
- transaction_receipts,
1440
- }
1441
- } ) ;
1442
-
1443
- Box :: pin ( block_future)
1444
1436
}
1445
1437
1446
1438
fn block_hash_by_block_number (
0 commit comments