@@ -1131,10 +1131,10 @@ def PrepareComplaint(self, electionId, inputFileName):
11311131 return fileName
11321132 #end define
11331133
1134- def CreateElectionRequest (self , wallet , startWorkTime , adnlAddr , maxFactor ):
1134+ def CreateElectionRequest (self , addrB64 , startWorkTime , adnlAddr , maxFactor ):
11351135 self .local .add_log ("start CreateElectionRequest function" , "debug" )
11361136 fileName = self .tempDir + self .nodeName + str (startWorkTime ) + "_validator-to-sign.bin"
1137- args = ["validator-elect-req.fif" , wallet . addrB64 , startWorkTime , maxFactor , adnlAddr , fileName ]
1137+ args = ["validator-elect-req.fif" , addrB64 , startWorkTime , maxFactor , adnlAddr , fileName ]
11381138 result = self .fift .Run (args )
11391139 fileName = parse (result , "Saved to file " , '\n ' )
11401140 resultList = result .split ('\n ' )
@@ -1319,7 +1319,7 @@ def GetStake(self, account, args=None):
13191319 #end if
13201320
13211321 pool_version = self .GetVersionFromCodeHash (account .codeHash )
1322- is_single_nominator = 'spool' in pool_version
1322+ is_single_nominator = pool_version is not None and 'spool' in pool_version
13231323
13241324 if stake is None and usePool and not is_single_nominator :
13251325 stake = account .balance - 20
@@ -1457,7 +1457,7 @@ def ElectionEntry(self, args=None):
14571457
14581458 # Create fift's. Continue with pool or walet
14591459 if usePool :
1460- var1 = self .CreateElectionRequest (pool , startWorkTime , adnl_addr , maxFactor )
1460+ var1 = self .CreateElectionRequest (pool . addrB64 , startWorkTime , adnl_addr , maxFactor )
14611461 validatorSignature = self .GetValidatorSignature (validatorKey , var1 )
14621462 validatorPubkey , resultFilePath = self .SignElectionRequestWithPoolWithValidator (pool , startWorkTime , adnl_addr , validatorPubkey_b64 , validatorSignature , maxFactor , stake )
14631463
@@ -1473,7 +1473,7 @@ def ElectionEntry(self, args=None):
14731473 resultFilePath = self .SignBocWithWallet (wallet , resultFilePath , controllerAddr , 1.03 )
14741474 self .SendFile (resultFilePath , wallet )
14751475 else :
1476- var1 = self .CreateElectionRequest (wallet , startWorkTime , adnl_addr , maxFactor )
1476+ var1 = self .CreateElectionRequest (wallet . addrB64 , startWorkTime , adnl_addr , maxFactor )
14771477 validatorSignature = self .GetValidatorSignature (validatorKey , var1 )
14781478 validatorPubkey , resultFilePath = self .SignElectionRequestWithValidator (wallet , startWorkTime , adnl_addr , validatorPubkey_b64 , validatorSignature , maxFactor )
14791479
@@ -4022,7 +4022,7 @@ def CheckLiquidPool(self):
40224022
40234023 for controllerAddr in addrs_list :
40244024 account = self .GetAccount (controllerAddr )
4025- version = self .GetWalletVersionFromHash (account .codeHash )
4025+ version = self .GetVersionFromCodeHash (account .codeHash )
40264026 if version is None or "controller" not in version :
40274027 continue
40284028 print (f"check controller: { controllerAddr } " )
0 commit comments