def getNextBlockWinner(self):
    winner = np.random.choice(np.arange(len(self.mining_powers)), p=self.mining_powers)
    self.hidden_lengths[winner] += 1
    return winner
def getNextBlockWinner(self):
    winner = np.random.choice(np.arange(len(self.mining_powers)), p=self.mining_powers)
    self.hidden_lengths[winner] += 1
    return winner