diff --git a/src/main/sdk/org/bdware/client/EventSubscriberClient.java b/src/main/sdk/org/bdware/client/EventSubscriberClient.java index 9de9b8d..e1351f0 100644 --- a/src/main/sdk/org/bdware/client/EventSubscriberClient.java +++ b/src/main/sdk/org/bdware/client/EventSubscriberClient.java @@ -46,23 +46,23 @@ public class EventSubscriberClient implements Handler { e.printStackTrace(); } } - Map setNodeID = new HashMap<>(); - setNodeID.put("action", "setNodeID"); - SM2KeyPair keyPair = SM2Util.generateSM2KeyPair(null); - setNodeID.put("id", keyPair.getPublicKeyStr()); - - byte[] sig; - try { - sig = - SM2Util.sign( - keyPair.getPrivateKeyParameter(), keyPair.getPublicKeyStr().getBytes()); - setNodeID.put("signature", ByteUtils.toHexString(sig)); - - } catch (CryptoException e) { - e.printStackTrace(); - } - setNodeID.put("nodeName", "[LiteClient_" + System.currentTimeMillis() + "]"); - bc.sendText(new Gson().toJson(setNodeID)); +// Map setNodeID = new HashMap<>(); +// setNodeID.put("action", "setNodeID"); +// SM2KeyPair keyPair = SM2Util.generateSM2KeyPair(null); +// setNodeID.put("id", keyPair.getPublicKeyStr()); +// +// byte[] sig; +// try { +// sig = +// SM2Util.sign( +// keyPair.getPrivateKeyParameter(), keyPair.getPublicKeyStr().getBytes()); +// setNodeID.put("signature", ByteUtils.toHexString(sig)); +// +// } catch (CryptoException e) { +// e.printStackTrace(); +// } +// setNodeID.put("nodeName", "[LiteClient_" + System.currentTimeMillis() + "]"); +// bc.sendText(new Gson().toJson(setNodeID)); } public void subscribeEvent(String contractID, String topic) { diff --git a/src/test/java/org/bdware/client/test/EventClientTest.java b/src/test/java/org/bdware/client/test/EventClientTest.java index 6b4946d..fa5b77c 100644 --- a/src/test/java/org/bdware/client/test/EventClientTest.java +++ b/src/test/java/org/bdware/client/test/EventClientTest.java @@ -6,7 +6,7 @@ import java.util.Scanner; public class EventClientTest { public static EventSubscriberClient getTestClient() { - return new EventSubscriberClient("ws://162.105.175.243:1718/SCIDE/NodeCenter"); + return new EventSubscriberClient("ws://localhost:8080/SCIDE/SCExecutor"); } public static void main(String[] args) {