let update ((epoch,old_seq) as old_info)
((epoch',new_seq) as new_info) =
begin match old_seq,new_seq with
| None,_ -> new_info
| _,None -> old_info
| (Some (first_msg,last_msg)),
(Some (first_msg',last_msg')) ->
if epoch' > epoch then begin
new_info
end else if epoch' = epoch then begin
let (<=) a b = Seqnum.compare a b <= 0 in
let (>=) a b = Seqnum.compare a b >= 0 in
if first_msg' <= first_msg && last_msg' >= last_msg then begin
new_info
end else begin
old_info
end
end else begin
old_info
end
end