def wait_until_mnsync_finished(self):
    SYNC_FINISHED = ([999] * self.num_nodes)
    synced = ([(- 1)] * self.num_nodes)
    time.sleep(2)
    timeout = (time.time() + 45)
    while ((synced != SYNC_FINISHED) and (time.time() < timeout)):
        for i in range(self.num_nodes):
            if (synced[i] != SYNC_FINISHED[i]):
                synced[i] = self.nodes[i].mnsync('status')['RequestedMasternodeAssets']
        if (synced != SYNC_FINISHED):
            self.advance_mocktime(2)
            time.sleep(5)
    if (synced != SYNC_FINISHED):
        raise AssertionError(('Unable to complete mnsync: %s' % str(synced)))
def wait_until_mnsync_finished(self):
    SYNC_FINISHED = ([999] * self.num_nodes)
    synced = ([(- 1)] * self.num_nodes)
    time.sleep(2)
    timeout = (time.time() + 45)
    while ((synced != SYNC_FINISHED) and (time.time() < timeout)):
        for i in range(self.num_nodes):
            if (synced[i] != SYNC_FINISHED[i]):
                synced[i] = self.nodes[i].mnsync('status')['RequestedMasternodeAssets']
        if (synced != SYNC_FINISHED):
            self.advance_mocktime(2)
            time.sleep(5)
    if (synced != SYNC_FINISHED):
        raise AssertionError(('Unable to complete mnsync: %s' % str(synced)))