示例#1
0
def checkList(msg, host):
	temp = VectorClock()
	data = getClock(host)
	for  (i,j) in data:
		temp.update(i,j)
	
	for (index,msgi) in enumerate(msg):
		aux = Vector.getCounter(str(index))
		
		try:
			aux_1 = temp.getCounter(str(index))
			Vector.update(str(index),int(aux_1))
		except:
			continue
			
			
		for (i,mes) in enumerate(messages):
			if i == index:
				mes[0] = msgi[0]