@@ -1205,7 +1205,8 @@ def SendFile(self, filePath, wallet=None, **kwargs):
12051205 timeout = kwargs .get ("timeout" , 30 )
12061206 remove = kwargs .get ("remove" , True )
12071207 duplicateSendfile = self .local .db .get ("duplicateSendfile" , True )
1208- duplicateApi = self .local .db .get ("duplicateApi" , False )
1208+ telemetry = self .local .db .get ("sendTelemetry" , False )
1209+ duplicateApi = self .local .db .get ("duplicateApi" , telemetry )
12091210 if not os .path .isfile (filePath ):
12101211 raise Exception ("SendFile error: no such file '{filePath}'" .format (filePath = filePath ))
12111212 if timeout and wallet :
@@ -1911,12 +1912,13 @@ def MoveCoinsFromHW(self, wallet, destList, **kwargs):
19111912
19121913 def GetValidatorKey (self ):
19131914 vconfig = self .GetValidatorConfig ()
1914- for validator in vconfig ["validators" ]:
1915+ validators = sorted (vconfig ["validators" ], key = lambda i : i ['election_date' ], reverse = True )
1916+ for validator in validators :
19151917 validatorId = validator ["id" ]
19161918 key_bytes = base64 .b64decode (validatorId )
19171919 validatorKey = key_bytes .hex ().upper ()
19181920 timestamp = get_timestamp ()
1919- if timestamp > validator ["election_date " ]:
1921+ if validator [ "election_date" ] < timestamp < validator ["expire_at " ]:
19201922 return validatorKey
19211923 raise Exception ("GetValidatorKey error: validator key not found. Are you sure you are a validator?" )
19221924 #end define
0 commit comments