message: Added passing in extra command args for cluster launch and passing extra flags for account creation. GH
diff: @@ -97,7 +97,7 @@ class Cluster(object):
  # pylint: disable=too-many-branches
  # pylint: disable=too-many-statements
  def launch(self, pnodes=1, totalNodes=1, prodCount=1, topo="mesh", p2pPlugin="net", delay=1, onlyBios=False, dontKill=False
  - , dontBootstrap=False, totalProducers=None):
  + , dontBootstrap=False, totalProducers=None, extraNodeosArgs=None):
  """Launch cluster.
  pnodes: producer nodes count
  totalNodes: producer + non-producer nodes count
  @@ -129,11 +129,14 @@ class Cluster(object):
  if self.staging:
  cmdArr.append("--nogen")
  - nodeosArgs="--max-transaction-time 5000 --abi-serializer-max-time-ms 5000 --filter-on * --p2p-max-nodes-per-host %d" % (totalNodes)
  + nodeosArgs="--max-transaction-time 50000 --abi-serializer-max-time-ms 50000 --filter-on * --p2p-max-nodes-per-host %d" % (totalNodes)
  if not self.walletd:
  nodeosArgs += " --plugin eosio::wallet_api_plugin"
  if self.enableMongo:
  nodeosArgs += " --plugin eosio::mongo_db_plugin --mongodb-wipe --delete-all-blocks --mongodb-uri %s" % self.mongoUri
  + if extraNodeosArgs is not None:
  + assert(isinstance(extraNodeosArgs, str))
  + nodeosArgs += extraNodeosArgs
  if Utils.Debug:
  nodeosArgs += " --contracts-console"
  @@ -564,11 +567,11 @@ class Cluster(object):
  node.validateAccounts(myAccounts)
  - def createAccountAndVerify(self, account, creator, stakedDeposit=1000):
  + def createAccountAndVerify(self, account, creator, stakedDeposit=1000, stakeNet=100, stakeCPU=100, buyRAM=100):
  """create account, verify account and return transaction id"""
  assert(len(self.nodes) > 0)
  node=self.nodes[0]
  - trans=node.createInitializeAccount(account, creator, stakedDeposit)
  + trans=node.createInitializeAccount(account, creator, stakedDeposit, stakeNet=stakeNet, stakeCPU=stakeCPU, buyRAM=buyRAM)
  assert(trans)
  assert(node.verifyAccount(account))
  return trans
  @@ -586,10 +589,10 @@ class Cluster(object):
  # return transId
  # return None
  - def createInitializeAccount(self, account, creatorAccount, stakedDeposit=1000, waitForTransBlock=False):
  + def createInitializeAccount(self, account, creatorAccount, stakedDeposit=1000, waitForTransBlock=False, stakeNet=100, stakeCPU=100, buyRAM=100):
  assert(len(self.nodes) > 0)
  node=self.nodes[0]
  - trans=node.createInitializeAccount(account, creatorAccount, stakedDeposit, waitForTransBlock)
  + trans=node.createInitializeAccount(account, creatorAccount, stakedDeposit, waitForTransBlock, stakeNet=stakeNet, stakeCPU=stakeCPU, buyRAM=buyRAM)
  return trans
  @staticmethod
  