File tree Expand file tree Collapse file tree
BTCPayServer.Plugins.USDt/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323using Nethereum . Contracts ;
2424using Nethereum . Contracts . Standards . ERC20 . ContractDefinition ;
2525using Nethereum . Hex . HexTypes ;
26+ using Nethereum . JsonRpc . Client ;
2627using Nethereum . RPC . Eth . DTOs ;
2728using Nethereum . Web3 ;
2829
@@ -132,6 +133,16 @@ await web3Client.Eth.Blocks.GetBlockWithTransactionsByNumber.SendRequestAsync(
132133 await SetTrackingState ( configurationItem , listenerState ) ;
133134 }
134135 }
136+ catch ( RpcClientTimeoutException e )
137+ {
138+ logger . LogWarning ( "Timeout while indexing, is the node running? Retrying in 10 seconds" ) ;
139+ Thread . Sleep ( 5_000 ) ;
140+ }
141+ catch ( RpcClientUnknownException e ) when ( e . InnerException ? . Message ? . Contains ( "429 (Too Many Requests)" ) == true )
142+ {
143+ logger . LogWarning ( "Rate limit exceeded while indexing, use a Tron node with higher limits if possible. Retrying in 10 seconds" ) ;
144+ Thread . Sleep ( 10_000 ) ;
145+ }
135146 catch ( Exception e )
136147 {
137148 logger . LogError ( e , "An error occurred while indexing" ) ;
You can’t perform that action at this time.
0 commit comments