This repository was archived by the owner on Mar 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -256,4 +256,8 @@ Documentation:
256
256
- WebEth has ` setTransactionMiddleware ` and ` getTransactionMiddleware ` for automatically passing to ` sentTransaction ` (#7088 )
257
257
- ` TransactionMiddleware ` and ` TransactionMiddleware ` data types are exported (#7088 )
258
258
259
- ## [ Unreleased]
259
+ ## [ Unreleased]
260
+
261
+ ### Fixed
262
+
263
+ - Fixed geth issue when running a new instance, transactions will index when there are no blocks created (#7098 )
Original file line number Diff line number Diff line change @@ -496,11 +496,22 @@ export async function getTransactionReceipt<ReturnFormat extends DataFormat>(
496
496
transactionHash ,
497
497
DEFAULT_RETURN_FORMAT ,
498
498
) ;
499
- const response = await ethRpcMethods . getTransactionReceipt (
500
- web3Context . requestManager ,
501
- transactionHashFormatted ,
502
- ) ;
503
-
499
+ let response ;
500
+ try {
501
+ response = await ethRpcMethods . getTransactionReceipt (
502
+ web3Context . requestManager ,
503
+ transactionHashFormatted ,
504
+ ) ;
505
+ } catch ( error ) {
506
+ // geth indexing error, we poll until transactions stopped indexing
507
+ if ( typeof error === 'object' && ! isNullish ( error ) && 'message' in error && ( error as { message : string } ) . message === 'transaction indexing is in progress' ) {
508
+ console . warn ( 'Transaction indexing is in progress.' )
509
+ } else {
510
+ throw error ;
511
+ }
512
+
513
+ }
514
+
504
515
return isNullish ( response )
505
516
? response
506
517
: ( format (
You can’t perform that action at this time.
0 commit comments