提交 69cf2a28 编写于 作者: B Brian Johnson

Changed to only create one wallet manager per test run. GH #5674

上级 458e1946
此差异已折叠。
...@@ -50,11 +50,12 @@ class Node(object): ...@@ -50,11 +50,12 @@ class Node(object):
self.lastRetrievedHeadBlockNum=None self.lastRetrievedHeadBlockNum=None
self.lastRetrievedLIB=None self.lastRetrievedLIB=None
self.transCache={} self.transCache={}
self.walletEndpointArgs=""
if self.enableMongo: if self.enableMongo:
self.mongoEndpointArgs += "--host %s --port %d %s" % (mongoHost, mongoPort, mongoDb) self.mongoEndpointArgs += "--host %s --port %d %s" % (mongoHost, mongoPort, mongoDb)
def eosClientArgs(self): def eosClientArgs(self):
return self.endpointArgs + " " + self.miscEosClientArgs return self.endpointArgs + self.walletEndpointArgs + " " + self.miscEosClientArgs
def __str__(self): def __str__(self):
#return "Host: %s, Port:%d, Pid:%s, Cmd:\"%s\"" % (self.host, self.port, self.pid, self.cmd) #return "Host: %s, Port:%d, Pid:%s, Cmd:\"%s\"" % (self.host, self.port, self.pid, self.cmd)
...@@ -227,7 +228,7 @@ class Node(object): ...@@ -227,7 +228,7 @@ class Node(object):
return arr.decode("utf-8") return arr.decode("utf-8")
def setWalletEndpointArgs(self, args): def setWalletEndpointArgs(self, args):
self.endpointArgs="--url http://%s:%d %s" % (self.host, self.port, args) self.walletEndpointArgs=args
def validateAccounts(self, accounts): def validateAccounts(self, accounts):
assert(accounts) assert(accounts)
......
...@@ -25,17 +25,27 @@ class WalletMgr(object): ...@@ -25,17 +25,27 @@ class WalletMgr(object):
self.host=host self.host=host
self.wallets={} self.wallets={}
self.__walletPid=None self.__walletPid=None
self.endpointArgs="--url http://%s:%d" % (self.nodeosHost, self.nodeosPort)
self.walletEndpointArgs="" def getWalletEndpointArgs(self):
if self.walletd: if not self.walletd:
self.walletEndpointArgs += " --wallet-url http://%s:%d" % (self.host, self.port) return ""
self.endpointArgs += self.walletEndpointArgs
return " --wallet-url http://%s:%d" % (self.host, self.port)
def getEndpointArgs(self):
return " --url http://%s:%d%s" % (self.nodeosHost, self.nodeosPort, self.getWalletEndpointArgs())
def isLaunched(self):
return self.__walletPid is not None
def launch(self): def launch(self):
if not self.walletd: if not self.walletd:
Utils.Print("ERROR: Wallet Manager wasn't configured to launch keosd") Utils.Print("ERROR: Wallet Manager wasn't configured to launch keosd")
return False return False
if self.isLaunched():
return True
if Utils.Debug: if Utils.Debug:
portStatus="N/A" portStatus="N/A"
portTaken=False portTaken=False
...@@ -80,7 +90,7 @@ class WalletMgr(object): ...@@ -80,7 +90,7 @@ class WalletMgr(object):
return wallet return wallet
p = re.compile(r'\n\"(\w+)\"\n', re.MULTILINE) p = re.compile(r'\n\"(\w+)\"\n', re.MULTILINE)
cmdDesc="wallet create" cmdDesc="wallet create"
cmd="%s %s %s --name %s --to-console" % (Utils.EosClientPath, self.endpointArgs, cmdDesc, name) cmd="%s %s %s --name %s --to-console" % (Utils.EosClientPath, self.getEndpointArgs(), cmdDesc, name)
if Utils.Debug: Utils.Print("cmd: %s" % (cmd)) if Utils.Debug: Utils.Print("cmd: %s" % (cmd))
retStr=None retStr=None
maxRetryCount=4 maxRetryCount=4
...@@ -139,7 +149,7 @@ class WalletMgr(object): ...@@ -139,7 +149,7 @@ class WalletMgr(object):
def importKey(self, account, wallet, ignoreDupKeyWarning=False): def importKey(self, account, wallet, ignoreDupKeyWarning=False):
warningMsg="Key already in wallet" warningMsg="Key already in wallet"
cmd="%s %s wallet import --name %s --private-key %s" % ( cmd="%s %s wallet import --name %s --private-key %s" % (
Utils.EosClientPath, self.endpointArgs, wallet.name, account.ownerPrivateKey) Utils.EosClientPath, self.getEndpointArgs(), wallet.name, account.ownerPrivateKey)
if Utils.Debug: Utils.Print("cmd: %s" % (cmd)) if Utils.Debug: Utils.Print("cmd: %s" % (cmd))
try: try:
Utils.checkOutput(cmd.split()) Utils.checkOutput(cmd.split())
...@@ -156,7 +166,7 @@ class WalletMgr(object): ...@@ -156,7 +166,7 @@ class WalletMgr(object):
Utils.Print("WARNING: Active private key is not defined for account \"%s\"" % (account.name)) Utils.Print("WARNING: Active private key is not defined for account \"%s\"" % (account.name))
else: else:
cmd="%s %s wallet import --name %s --private-key %s" % ( cmd="%s %s wallet import --name %s --private-key %s" % (
Utils.EosClientPath, self.endpointArgs, wallet.name, account.activePrivateKey) Utils.EosClientPath, self.getEndpointArgs(), wallet.name, account.activePrivateKey)
if Utils.Debug: Utils.Print("cmd: %s" % (cmd)) if Utils.Debug: Utils.Print("cmd: %s" % (cmd))
try: try:
Utils.checkOutput(cmd.split()) Utils.checkOutput(cmd.split())
...@@ -173,7 +183,7 @@ class WalletMgr(object): ...@@ -173,7 +183,7 @@ class WalletMgr(object):
return True return True
def lockWallet(self, wallet): def lockWallet(self, wallet):
cmd="%s %s wallet lock --name %s" % (Utils.EosClientPath, self.endpointArgs, wallet.name) cmd="%s %s wallet lock --name %s" % (Utils.EosClientPath, self.getEndpointArgs(), wallet.name)
if Utils.Debug: Utils.Print("cmd: %s" % (cmd)) if Utils.Debug: Utils.Print("cmd: %s" % (cmd))
if 0 != subprocess.call(cmd.split(), stdout=Utils.FNull): if 0 != subprocess.call(cmd.split(), stdout=Utils.FNull):
Utils.Print("ERROR: Failed to lock wallet %s." % (wallet.name)) Utils.Print("ERROR: Failed to lock wallet %s." % (wallet.name))
...@@ -182,7 +192,7 @@ class WalletMgr(object): ...@@ -182,7 +192,7 @@ class WalletMgr(object):
return True return True
def unlockWallet(self, wallet): def unlockWallet(self, wallet):
cmd="%s %s wallet unlock --name %s" % (Utils.EosClientPath, self.endpointArgs, wallet.name) cmd="%s %s wallet unlock --name %s" % (Utils.EosClientPath, self.getEndpointArgs(), wallet.name)
if Utils.Debug: Utils.Print("cmd: %s" % (cmd)) if Utils.Debug: Utils.Print("cmd: %s" % (cmd))
popen=subprocess.Popen(cmd.split(), stdout=Utils.FNull, stdin=subprocess.PIPE) popen=subprocess.Popen(cmd.split(), stdout=Utils.FNull, stdin=subprocess.PIPE)
_, errs = popen.communicate(input=wallet.password.encode("utf-8")) _, errs = popen.communicate(input=wallet.password.encode("utf-8"))
...@@ -193,7 +203,7 @@ class WalletMgr(object): ...@@ -193,7 +203,7 @@ class WalletMgr(object):
return True return True
def lockAllWallets(self): def lockAllWallets(self):
cmd="%s %s wallet lock_all" % (Utils.EosClientPath, self.endpointArgs) cmd="%s %s wallet lock_all" % (Utils.EosClientPath, self.getEndpointArgs())
if Utils.Debug: Utils.Print("cmd: %s" % (cmd)) if Utils.Debug: Utils.Print("cmd: %s" % (cmd))
if 0 != subprocess.call(cmd.split(), stdout=Utils.FNull): if 0 != subprocess.call(cmd.split(), stdout=Utils.FNull):
Utils.Print("ERROR: Failed to lock all wallets.") Utils.Print("ERROR: Failed to lock all wallets.")
...@@ -205,7 +215,7 @@ class WalletMgr(object): ...@@ -205,7 +215,7 @@ class WalletMgr(object):
wallets=[] wallets=[]
p = re.compile(r'\s+\"(\w+)\s\*\",?\n', re.MULTILINE) p = re.compile(r'\s+\"(\w+)\s\*\",?\n', re.MULTILINE)
cmd="%s %s wallet list" % (Utils.EosClientPath, self.endpointArgs) cmd="%s %s wallet list" % (Utils.EosClientPath, self.getEndpointArgs())
if Utils.Debug: Utils.Print("cmd: %s" % (cmd)) if Utils.Debug: Utils.Print("cmd: %s" % (cmd))
retStr=None retStr=None
try: try:
...@@ -227,7 +237,7 @@ class WalletMgr(object): ...@@ -227,7 +237,7 @@ class WalletMgr(object):
keys=[] keys=[]
p = re.compile(r'\n\s+\"(\w+)\"\n', re.MULTILINE) p = re.compile(r'\n\s+\"(\w+)\"\n', re.MULTILINE)
cmd="%s %s wallet private_keys --name %s --password %s " % (Utils.EosClientPath, self.endpointArgs, wallet.name, wallet.password) cmd="%s %s wallet private_keys --name %s --password %s " % (Utils.EosClientPath, self.getEndpointArgs(), wallet.name, wallet.password)
if Utils.Debug: Utils.Print("cmd: %s" % (cmd)) if Utils.Debug: Utils.Print("cmd: %s" % (cmd))
retStr=None retStr=None
try: try:
......
...@@ -257,11 +257,6 @@ def myTest(transWillEnterBlock): ...@@ -257,11 +257,6 @@ def myTest(transWillEnterBlock):
currencyAccount=accounts[0] currencyAccount=accounts[0]
currencyAccount.name="currency0000" currencyAccount.name="currency0000"
Print("Stand up walletd")
if walletMgr.launch() is False:
error("Failed to stand up eos walletd.")
return False
testWalletName="test" testWalletName="test"
Print("Creating wallet \"%s\"." % (testWalletName)) Print("Creating wallet \"%s\"." % (testWalletName))
testWallet=walletMgr.create(testWalletName) testWallet=walletMgr.create(testWalletName)
......
...@@ -47,11 +47,15 @@ try: ...@@ -47,11 +47,15 @@ try:
if not cluster.initializeNodesFromJson(jsonStr): if not cluster.initializeNodesFromJson(jsonStr):
errorExit("Failed to initilize nodes from Json string.") errorExit("Failed to initilize nodes from Json string.")
total_nodes=len(cluster.getNodes()) total_nodes=len(cluster.getNodes())
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
print("Stand up walletd")
if walletMgr.launch() is False:
errorExit("Failed to stand up keosd.")
else: else:
cluster.killall(allInstances=killAll) cluster.killall(allInstances=killAll)
cluster.cleanup() cluster.cleanup()
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
Print ("producing nodes: %s, non-producing nodes: %d, topology: %s, delay between nodes launch(seconds): %d" % Print ("producing nodes: %s, non-producing nodes: %d, topology: %s, delay between nodes launch(seconds): %d" %
(pnodes, total_nodes-pnodes, topo, delay)) (pnodes, total_nodes-pnodes, topo, delay))
...@@ -65,12 +69,6 @@ try: ...@@ -65,12 +69,6 @@ try:
if not cluster.waitOnClusterBlockNumSync(3): if not cluster.waitOnClusterBlockNumSync(3):
errorExit("Cluster never stabilized") errorExit("Cluster never stabilized")
Print("Stand up EOS wallet keosd")
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
if walletMgr.launch() is False:
errorExit("Failed to stand up keosd.")
accountsCount=total_nodes accountsCount=total_nodes
walletName="MyWallet-%d" % (random.randrange(10000)) walletName="MyWallet-%d" % (random.randrange(10000))
Print("Creating wallet %s if one doesn't already exist." % walletName) Print("Creating wallet %s if one doesn't already exist." % walletName)
......
...@@ -46,20 +46,26 @@ Utils.setIrreversibleTimeout(timeout) ...@@ -46,20 +46,26 @@ Utils.setIrreversibleTimeout(timeout)
try: try:
TestHelper.printSystemInfo("BEGIN") TestHelper.printSystemInfo("BEGIN")
walletMgr.killall(allInstances=killAll) cluster.setWalletMgr(walletMgr)
walletMgr.cleanup()
if not dontLaunch: if not dontLaunch:
cluster.killall(allInstances=killAll) cluster.killall(allInstances=killAll)
cluster.cleanup() cluster.cleanup()
Print("Stand up cluster") Print("Stand up cluster")
if cluster.launch(pnodes=4, dontKill=dontKill, p2pPlugin=p2pPlugin) is False: if cluster.launch(pnodes=4, p2pPlugin=p2pPlugin) is False:
cmdError("launcher") cmdError("launcher")
errorExit("Failed to stand up eos cluster.") errorExit("Failed to stand up eos cluster.")
else: else:
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
cluster.initializeNodes(defproduceraPrvtKey=defproduceraPrvtKey) cluster.initializeNodes(defproduceraPrvtKey=defproduceraPrvtKey)
killEosInstances=False killEosInstances=False
print("Stand up walletd")
if walletMgr.launch() is False:
cmdError("%s" % (WalletdName))
errorExit("Failed to stand up eos walletd.")
Print("Validating system accounts after bootstrap") Print("Validating system accounts after bootstrap")
cluster.validateAccounts(None) cluster.validateAccounts(None)
...@@ -86,13 +92,6 @@ try: ...@@ -86,13 +92,6 @@ try:
exchangeAccount.ownerPrivateKey=PRV_KEY2 exchangeAccount.ownerPrivateKey=PRV_KEY2
exchangeAccount.ownerPublicKey=PUB_KEY2 exchangeAccount.ownerPublicKey=PUB_KEY2
Print("Stand up %s" % (WalletdName))
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
if walletMgr.launch() is False:
cmdError("%s" % (WalletdName))
errorExit("Failed to stand up eos walletd.")
testWalletName="test" testWalletName="test"
Print("Creating wallet \"%s\"." % (testWalletName)) Print("Creating wallet \"%s\"." % (testWalletName))
testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount,cluster.defproduceraAccount]) testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount,cluster.defproduceraAccount])
......
...@@ -128,6 +128,7 @@ ClientName="cleos" ...@@ -128,6 +128,7 @@ ClientName="cleos"
try: try:
TestHelper.printSystemInfo("BEGIN") TestHelper.printSystemInfo("BEGIN")
cluster.setWalletMgr(walletMgr)
cluster.killall(allInstances=killAll) cluster.killall(allInstances=killAll)
cluster.cleanup() cluster.cleanup()
Print("Stand up cluster") Print("Stand up cluster")
...@@ -141,7 +142,7 @@ try: ...@@ -141,7 +142,7 @@ try:
# "bridge" shape connects defprocera through defproducerk (in node0) to each other and defproducerl through defproduceru (in node01) # "bridge" shape connects defprocera through defproducerk (in node0) to each other and defproducerl through defproduceru (in node01)
# and the only connection between those 2 groups is through the bridge node # and the only connection between those 2 groups is through the bridge node
if cluster.launch(prodCount=prodCount, onlyBios=False, dontKill=dontKill, topo="bridge", pnodes=totalProducerNodes, if cluster.launch(prodCount=prodCount, onlyBios=False, topo="bridge", pnodes=totalProducerNodes,
totalNodes=totalNodes, totalProducers=totalProducers, p2pPlugin=p2pPlugin, totalNodes=totalNodes, totalProducers=totalProducers, p2pPlugin=p2pPlugin,
useBiosBootFile=False, specificExtraNodeosArgs=specificExtraNodeosArgs) is False: useBiosBootFile=False, specificExtraNodeosArgs=specificExtraNodeosArgs) is False:
Utils.cmdError("launcher") Utils.cmdError("launcher")
...@@ -164,12 +165,6 @@ try: ...@@ -164,12 +165,6 @@ try:
testWalletName="test" testWalletName="test"
Print("Creating wallet \"%s\"." % (testWalletName)) Print("Creating wallet \"%s\"." % (testWalletName))
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
if walletMgr.launch() is False:
Utils.cmdError("%s" % (WalletdName))
Utils.errorExit("Failed to stand up eos walletd.")
testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount,accounts[0],accounts[1],accounts[2],accounts[3],accounts[4]]) testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount,accounts[0],accounts[1],accounts[2],accounts[3],accounts[4]])
for _, account in cluster.defProducerAccounts.items(): for _, account in cluster.defProducerAccounts.items():
......
...@@ -42,7 +42,7 @@ try: ...@@ -42,7 +42,7 @@ try:
Print ("producing nodes: %s, non-producing nodes: %d, topology: %s, delay between nodes launch(seconds): %d" % Print ("producing nodes: %s, non-producing nodes: %d, topology: %s, delay between nodes launch(seconds): %d" %
(pnodes, total_nodes-pnodes, topo, delay)) (pnodes, total_nodes-pnodes, topo, delay))
Print("Stand up cluster") Print("Stand up cluster")
if cluster.launch(pnodes, total_nodes, prodCount, topo, delay, onlyBios=onlyBios, dontKill=dontKill) is False: if cluster.launch(pnodes, total_nodes, prodCount, topo, delay, onlyBios=onlyBios) is False:
errorExit("Failed to stand up eos cluster.") errorExit("Failed to stand up eos cluster.")
Print ("Wait for Cluster stabilization") Print ("Wait for Cluster stabilization")
......
...@@ -55,25 +55,30 @@ Utils.setIrreversibleTimeout(timeout) ...@@ -55,25 +55,30 @@ Utils.setIrreversibleTimeout(timeout)
try: try:
TestHelper.printSystemInfo("BEGIN") TestHelper.printSystemInfo("BEGIN")
cluster.setWalletMgr(walletMgr)
Print("SERVER: %s" % (server)) Print("SERVER: %s" % (server))
Print("PORT: %d" % (port)) Print("PORT: %d" % (port))
if enableMongo and not cluster.isMongodDbRunning(): if enableMongo and not cluster.isMongodDbRunning():
errorExit("MongoDb doesn't seem to be running.") errorExit("MongoDb doesn't seem to be running.")
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
if localTest and not dontLaunch: if localTest and not dontLaunch:
cluster.killall(allInstances=killAll) cluster.killall(allInstances=killAll)
cluster.cleanup() cluster.cleanup()
Print("Stand up cluster") Print("Stand up cluster")
if cluster.launch(prodCount=prodCount, onlyBios=onlyBios, dontKill=dontKill, dontBootstrap=dontBootstrap, p2pPlugin=p2pPlugin) is False: if cluster.launch(prodCount=prodCount, onlyBios=onlyBios, dontBootstrap=dontBootstrap, p2pPlugin=p2pPlugin) is False:
cmdError("launcher") cmdError("launcher")
errorExit("Failed to stand up eos cluster.") errorExit("Failed to stand up eos cluster.")
else: else:
cluster.initializeNodes(defproduceraPrvtKey=defproduceraPrvtKey, defproducerbPrvtKey=defproducerbPrvtKey) cluster.initializeNodes(defproduceraPrvtKey=defproduceraPrvtKey, defproducerbPrvtKey=defproducerbPrvtKey)
killEosInstances=False killEosInstances=False
Print("Stand up %s" % (WalletdName))
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
print("Stand up walletd")
if walletMgr.launch() is False:
cmdError("%s" % (WalletdName))
errorExit("Failed to stand up eos walletd.")
if sanityTest: if sanityTest:
testSuccessful=True testSuccessful=True
...@@ -105,13 +110,6 @@ try: ...@@ -105,13 +110,6 @@ try:
exchangeAccount.ownerPrivateKey=PRV_KEY2 exchangeAccount.ownerPrivateKey=PRV_KEY2
exchangeAccount.ownerPublicKey=PUB_KEY2 exchangeAccount.ownerPublicKey=PUB_KEY2
Print("Stand up %s" % (WalletdName))
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
if walletMgr.launch() is False:
cmdError("%s" % (WalletdName))
errorExit("Failed to stand up eos walletd.")
testWalletName="test" testWalletName="test"
Print("Creating wallet \"%s\"." % (testWalletName)) Print("Creating wallet \"%s\"." % (testWalletName))
testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount,cluster.defproduceraAccount,cluster.defproducerbAccount]) testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount,cluster.defproduceraAccount,cluster.defproducerbAccount])
......
...@@ -73,6 +73,7 @@ ClientName="cleos" ...@@ -73,6 +73,7 @@ ClientName="cleos"
try: try:
TestHelper.printSystemInfo("BEGIN") TestHelper.printSystemInfo("BEGIN")
cluster.setWalletMgr(walletMgr)
cluster.killall(allInstances=killAll) cluster.killall(allInstances=killAll)
cluster.cleanup() cluster.cleanup()
...@@ -82,7 +83,7 @@ try: ...@@ -82,7 +83,7 @@ try:
maxRAMFlag="--chain-state-db-size-mb" maxRAMFlag="--chain-state-db-size-mb"
maxRAMValue=1010 maxRAMValue=1010
extraNodeosArgs=" %s %d %s %d " % (minRAMFlag, minRAMValue, maxRAMFlag, maxRAMValue) extraNodeosArgs=" %s %d %s %d " % (minRAMFlag, minRAMValue, maxRAMFlag, maxRAMValue)
if cluster.launch(onlyBios=False, dontKill=dontKill, pnodes=totalNodes, totalNodes=totalNodes, totalProducers=totalNodes, extraNodeosArgs=extraNodeosArgs, useBiosBootFile=False) is False: if cluster.launch(onlyBios=False, pnodes=totalNodes, totalNodes=totalNodes, totalProducers=totalNodes, extraNodeosArgs=extraNodeosArgs, useBiosBootFile=False) is False:
Utils.cmdError("launcher") Utils.cmdError("launcher")
errorExit("Failed to stand up eos cluster.") errorExit("Failed to stand up eos cluster.")
...@@ -96,12 +97,6 @@ try: ...@@ -96,12 +97,6 @@ try:
testWalletName="test" testWalletName="test"
Print("Creating wallet \"%s\"." % (testWalletName)) Print("Creating wallet \"%s\"." % (testWalletName))
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
if walletMgr.launch() is False:
Utils.cmdError("%s" % (WalletdName))
errorExit("Failed to stand up eos walletd.")
testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount]) testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount])
for _, account in cluster.defProducerAccounts.items(): for _, account in cluster.defProducerAccounts.items():
......
...@@ -161,11 +161,12 @@ ClientName="cleos" ...@@ -161,11 +161,12 @@ ClientName="cleos"
try: try:
TestHelper.printSystemInfo("BEGIN") TestHelper.printSystemInfo("BEGIN")
cluster.setWalletMgr(walletMgr)
cluster.killall(allInstances=killAll) cluster.killall(allInstances=killAll)
cluster.cleanup() cluster.cleanup()
Print("Stand up cluster") Print("Stand up cluster")
if cluster.launch(prodCount=prodCount, onlyBios=False, dontKill=dontKill, pnodes=totalNodes, totalNodes=totalNodes, totalProducers=totalNodes*21, p2pPlugin=p2pPlugin, useBiosBootFile=False) is False: if cluster.launch(prodCount=prodCount, onlyBios=False, pnodes=totalNodes, totalNodes=totalNodes, totalProducers=totalNodes*21, p2pPlugin=p2pPlugin, useBiosBootFile=False) is False:
Utils.cmdError("launcher") Utils.cmdError("launcher")
Utils.errorExit("Failed to stand up eos cluster.") Utils.errorExit("Failed to stand up eos cluster.")
...@@ -184,12 +185,6 @@ try: ...@@ -184,12 +185,6 @@ try:
testWalletName="test" testWalletName="test"
Print("Creating wallet \"%s\"." % (testWalletName)) Print("Creating wallet \"%s\"." % (testWalletName))
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
if walletMgr.launch() is False:
Utils.cmdError("%s" % (WalletdName))
Utils.errorExit("Failed to stand up eos walletd.")
testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount,accounts[0],accounts[1],accounts[2],accounts[3],accounts[4]]) testWallet=walletMgr.create(testWalletName, [cluster.eosioAccount,accounts[0],accounts[1],accounts[2],accounts[3],accounts[4]])
for _, account in cluster.defProducerAccounts.items(): for _, account in cluster.defProducerAccounts.items():
......
...@@ -52,6 +52,7 @@ walletMgr=WalletMgr(True) ...@@ -52,6 +52,7 @@ walletMgr=WalletMgr(True)
try: try:
TestHelper.printSystemInfo("BEGIN") TestHelper.printSystemInfo("BEGIN")
cluster.setWalletMgr(walletMgr)
cluster.setChainStrategy(chainSyncStrategyStr) cluster.setChainStrategy(chainSyncStrategyStr)
cluster.setWalletMgr(walletMgr) cluster.setWalletMgr(walletMgr)
...@@ -74,11 +75,6 @@ try: ...@@ -74,11 +75,6 @@ try:
errorExit("Cluster never stabilized") errorExit("Cluster never stabilized")
Print("Stand up EOS wallet keosd") Print("Stand up EOS wallet keosd")
walletMgr.killall(allInstances=killAll)
walletMgr.cleanup()
if walletMgr.launch() is False:
errorExit("Failed to stand up keosd.")
accountsCount=total_nodes accountsCount=total_nodes
walletName="MyWallet" walletName="MyWallet"
Print("Creating wallet %s if one doesn't already exist." % walletName) Print("Creating wallet %s if one doesn't already exist." % walletName)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册