def mint_all_i_can_mint_after_become_issuer(self): role = BaseRole(env.host) licenseinfo = role.getlicenseinfo() for color, info in licenseinfo.iteritems(): if int(color) == 1: # already minted in apply_license_1() # skip this case otherwise coins may overflow continue issuer = Issuer(env.host, info['address'], color) # TODO: if mint MAX_COINS = 10^10 # sendfrom rpc error: The transaction was rejected will happen issuer.mint(config.INITIAL_AMOUNT_PER_ISSUER)
def random_apply_member(self): result = {} role = BaseRole(env.host) licenseinfo = role.getlicenseinfo() for color, info in licenseinfo.iteritems(): if int(color) == 1: # for the use of fee continue members = [] issuer = Issuer(env.host, info['address'], color) for idx in xrange(config.MAX_NUM_MEMBERS_PER_ISSUER): member_address = self._random_choose_an_address('others') if member_address in members: continue issuer.activate(member_address, config.INITIAL_AMOUNT_PER_ISSUER / config.MAX_NUM_MEMBERS_PER_ISSUER) members.append(member_address) result[color] = members return result