diff --git a/specifications/ewd998/impl/src/EWD998.java b/specifications/ewd998/impl/src/EWD998.java index e8e8f53f..0e16913e 100644 --- a/specifications/ewd998/impl/src/EWD998.java +++ b/specifications/ewd998/impl/src/EWD998.java @@ -31,6 +31,7 @@ public class EWD998 { private static final JsonPrimitive PL = new JsonPrimitive("pl"); private static final String EVENT = "event"; + private static final String NODE = "node"; private static final JsonPrimitive IN = new JsonPrimitive("<"); private static final JsonPrimitive OUT = new JsonPrimitive(">"); @@ -132,6 +133,7 @@ public EWD998(final Map nodes, final int myId, final boolean isIn // event shows is this is an incoming ("<") or outgoing (">") packet. final JsonObject logline = new JsonObject(); logline.add(EVENT, IN); + logline.add(NODE, new JsonPrimitive(myId)); pkt.add(VC, vc.tickAndMerge(pkt.get(VC).getAsJsonObject())); logline.add(PKT, pkt); System.out.println(logline); @@ -316,6 +318,7 @@ private void sendMsg(final int sender, final int receiver, final JsonObject msg) pkt.add(VC, vc.tick()); final JsonObject logline = new JsonObject(); logline.add(EVENT, OUT); + logline.add(NODE, new JsonPrimitive(sender)); logline.add(PKT, pkt); final Pair p = nodes.get(receiver);