def setup_head_alliance(self): alliance = Alliance(env.host, self.collect_addresses[env.host]['default']) if env.host == env.roledefs['alliance'][0]: alliance.start_mining() else: # To ensure that other alliance acknowledge the first alliance acknowledged = False while not acknowledged: if alliance.getblockcount() > 0: acknowledged = True
def start_all_miners(self): alliance = Alliance(env.host, self.collect_addresses[env.host]['default']) return alliance.start_mining()