@@ -25,6 +25,7 @@ def __init__(self, rpc_metadata):
2525 self .ws_collector .setDaemon (True )
2626 self .ws_collector .start ()
2727 self .record_difficulty = True
28+ self .record_max_priority_fee = True
2829
2930 else :
3031 logger .error ("Please provide wss/ws endpoint for {}" .format (strip_url (self .url )))
@@ -44,10 +45,15 @@ def probe(self) -> results:
4445 results .record_total_difficulty (self .url , self .client .eth .get_block ('latest' )['totalDifficulty' ])
4546 results .record_difficulty (self .url , self .client .eth .get_block ('latest' )['difficulty' ])
4647 except ExtraDataLengthError :
47- logger .info ("It looks like this is a POA chain, and does not use difficulty anymore. Collector will ignore difficulty metric from this point on" )
48+ logger .info ("It looks like this is a POA chain, and does not use difficulty anymore. Collector will ignore difficulty metric from this point on. " )
4849 self .record_difficulty = False
50+ try :
51+ if self .record_max_priority_fee :
52+ results .record_max_priority_fee (self .url , self .client .eth .max_priority_fee )
53+ except ValueError :
54+ self .record_max_priority_fee = False
55+ logger .info ("It look slike max_priority_fee method is not supported on this chain. Collector will ignore difficulty metric from this point on." )
4956 results .record_gas_price (self .url , self .client .eth .gas_price )
50- results .record_max_priority_fee (self .url , self .client .eth .max_priority_fee )
5157 results .record_client_version (self .url , self .client .clientVersion )
5258 else :
5359 logger .info ("Client is not connected to {}" .format (strip_url (self .url )))
0 commit comments