MutableDigest digest=new MutableDigest(coord_view.getMembersRaw());
NAKACK2 nakack=(NAKACK2)coord_channel.getProtocolStack().findProtocol(NAKACK2.class);
digest.merge(nakack.getDigest(coord));
GMS gms=(GMS)coord_channel.getProtocolStack().findProtocol(GMS.class);
gms.installView(coord_view, digest);
System.out.println("gms.getView() " + gms.getView());
System.out.println("Views are:");
for(JChannel ch: Arrays.asList(a,b,c,d))
System.out.println(ch.getAddress() + ": " + ch.getView());
JChannel merge_leader=findChannel(coord);
MyReceiver receiver=new MyReceiver();
merge_leader.setReceiver(receiver);
System.out.println("merge_leader: " + merge_leader.getAddressAsString());
System.out.println("Injecting MERGE event into merge leader " + merge_leader.getAddress());
Map<Address,View> merge_views=new HashMap<Address,View>(4);
merge_views.put(a.getAddress(), a.getView());
merge_views.put(b.getAddress(), b.getView());
merge_views.put(c.getAddress(), c.getView());
merge_views.put(d.getAddress(), d.getView());
gms=(GMS)merge_leader.getProtocolStack().findProtocol(GMS.class);
gms.up(new Event(Event.MERGE, merge_views));
Util.waitUntilAllChannelsHaveSameSize(10000000, 1000, a,b,c,d);
System.out.println("Views are:");
for(JChannel ch: Arrays.asList(a,b,c,d)) {