From 9d532633bfc18cebbe6d14926073ec49f495a05a Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Tue, 18 Oct 2022 15:53:43 +0100 Subject: [PATCH 01/10] CORE-7176: Setup Template Project Notification * Updated Jenkinsfile to use #corda-corda5-developer-experience as the default slack channel destination. --- .ci/Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 8e0651c..2e1e13d 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -4,5 +4,6 @@ cordaPipeline( publishRepoPrefix: '', slimBuild: true, runUnitTests: false, - dedicatedJobForSnykDelta: false + dedicatedJobForSnykDelta: false, + slackChannel: '#corda-corda5-developer-experience' ) From c4b8f4fa1b6068ad8cf10d6008072a306d2a8b40 Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Thu, 20 Oct 2022 10:41:50 +0100 Subject: [PATCH 02/10] CORE-7176: Setup Template Project Notification * Updated slackChannel in .ci/Jenkinsfile to send notification to '#corda-corda5-dev-ex-build-notifications' --- .ci/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 2e1e13d..330a1e5 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -5,5 +5,5 @@ cordaPipeline( slimBuild: true, runUnitTests: false, dedicatedJobForSnykDelta: false, - slackChannel: '#corda-corda5-developer-experience' + slackChannel: '#corda-corda5-dev-ex-build-notifications' ) From fe9ab2cda1108aff44ac0cda5509d0f1d71e23ed Mon Sep 17 00:00:00 2001 From: Niamh25 Date: Thu, 17 Nov 2022 16:27:11 +0000 Subject: [PATCH 03/10] DOC-4345: updated edited Java CSDE template code comments --- build.gradle | 4 +-- buildSrc/src/main/groovy/csde.gradle | 10 +++--- .../java/com/r3/csde/CsdeRpcInterface.java | 16 ++++----- .../r3/developers/csdetemplate/Message.java | 4 +-- .../developers/csdetemplate/MyFirstFlow.java | 36 +++++++++---------- .../csdetemplate/MyFirstFlowResponder.java | 18 +++++----- .../csdetemplate/MyFirstFlowTest.java | 22 ++++++------ 7 files changed, 55 insertions(+), 55 deletions(-) diff --git a/build.gradle b/build.gradle index ff011d9..e1a62dc 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,7 @@ def javaVersion = VERSION_11 cordapp { // "targetPlatformVersion" and "minimumPlatformVersion" are intended to specify the preferred // and earliest versions of the Corda platform that the CorDapp will run on respectively. - // Enforced versioning has not implemented yet so we need to pass in a dummy value for now. + // Enforced versioning has not been implemented yet, so enter a dummy value for now. // The platform version will correspond to and be roughly equivalent to the Corda API version. targetPlatformVersion platformVersion.toInteger() minimumPlatformVersion platformVersion.toInteger() @@ -61,7 +61,7 @@ repositories { // Declare dependencies for the modules we will use. // A cordaProvided declaration is required for anything that we use that the Corda API provides. -// This is required to allow us to build CorDapp modules as OSGi bundles that CPI and CPB files are built on. +// This is required to allow us to build CorDapp modules as OSGi bundles that CPI and CPB files are then built upon. dependencies { // Declare a "platform" so that we use the correct set of dependency versions for the version of the // Corda API specified. diff --git a/buildSrc/src/main/groovy/csde.gradle b/buildSrc/src/main/groovy/csde.gradle index f2fe6a4..6efb924 100644 --- a/buildSrc/src/main/groovy/csde.gradle +++ b/buildSrc/src/main/groovy/csde.gradle @@ -34,8 +34,8 @@ def cordaBinDir= System.getProperty('user.home') + "/.corda/corda5" def cordaCliBinDir = System.getProperty('user.home') + "/.corda/cli" def cordaJDBCDir = cordaBinDir + "/jdbcDrivers" def signingCertAlias="gradle-plugin-default-key" -// Get error if this is not a autotyped object -// def signingCertFName = "$rootDir/config/gradle-plugin-default-key.pem" +// You will receive an error if this is not a autotyped object. +// def signingCertFName = "$rootDir/config/gradle-plugin-default-key.pem". def signingCertFName = rootDir.toString() + "/config/gradle-plugin-default-key.pem" def keystoreAlias = "my-signing-key" def keystoreFName = devEnvWorkspace + "/signingkeys.pfx" @@ -136,7 +136,7 @@ tasks.register('createKeystore') { "-storetype", "pkcs12", "-validity", "4000" } - // Need to add the default signing key to the keystore + // Add the default signing key to the keystore. exec { commandLine "${System.getProperty("java.home")}/bin/keytool", "-importcert", "-keystore", keystoreFName, @@ -172,7 +172,7 @@ tasks.register('buildCPI') { File srcDir srcDir = file('build/libs') - // Create a file collection using a closure + // Create a file collection using a closure. def collection = layout.files { srcDir.listFiles() } def cpbs = collection.filter { it.getName().endsWith(".cpb") } @@ -225,7 +225,7 @@ tasks.register('listCPIs') { } } -// Empty task, just acts as the Task user entry point task. +// Empty task, this acts as the user entry point task. tasks.register('deployCordapp') { group = pluginGroupName dependsOn("createAndRegVNodes") diff --git a/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java b/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java index eef8c7e..3776d84 100644 --- a/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java +++ b/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java @@ -202,9 +202,9 @@ public class CsdeRpcInterface { private boolean uploadStatusRetry(kong.unirest.HttpResponse response) { int status = response.getStatus(); kong.unirest.JsonNode body = response.getBody(); - // Do not retry on success + // Do not retry if successful. if(status == 200) { - // Keep retrying until we get "OK" may move through "Validateing upload", "Persisting CPI" + // Retry until you get an "OK", it may move to "Validating upload", "Persisting CPI". return !(body.getObject().get("status").equals("OK")); } else if (status == 400){ @@ -269,7 +269,7 @@ public class CsdeRpcInterface { out.println("Upload Status:" + status); out.println("Pretty print the body\n" + body.toPrettyString()); - // We expect the id field to be a string. + // Expect the ID field to be a string. if (status == 200) { String id = (String) body.getObject().get("id"); out.println("get id:\n" + id); @@ -299,7 +299,7 @@ public class CsdeRpcInterface { LinkedList x500Ids = getConfigX500Ids(); LinkedList OKHoldingShortIds = new LinkedList<>(); - // For each identity check that it already exists. + // Check that each identity already exists. Set existingX500 = new HashSet<>(); kong.unirest.HttpResponse vnodeListResponse = getVNodeInfo(); @@ -322,9 +322,9 @@ public class CsdeRpcInterface { .asJson(); // Logging. - // need to check this and report errors. - // 200 - OK - // 409 - Vnode already exists + // Check this and report errors. + // 200 - OK. + // 409 - Vnode already exists. if (jsonNode.getStatus() != 409) { if (jsonNode.getStatus() != 200) { reportError(jsonNode); @@ -340,7 +340,7 @@ public class CsdeRpcInterface { } } - // Register the VNodes + // Register the VNodes. for(String shortHoldingIdHash: OKHoldingShortIds) { kong.unirest.HttpResponse vnodeResponse = Unirest.post(baseURL + "/api/v1/membership/" + shortHoldingIdHash) .body("{ \"memberRegistrationRequest\": { \"action\": \"requestJoin\", \"context\": { \"corda.key.scheme\" : \"CORDA.ECDSA.SECP256R1\" } } }") diff --git a/src/main/java/com/r3/developers/csdetemplate/Message.java b/src/main/java/com/r3/developers/csdetemplate/Message.java index 4ca6092..58dc5b8 100644 --- a/src/main/java/com/r3/developers/csdetemplate/Message.java +++ b/src/main/java/com/r3/developers/csdetemplate/Message.java @@ -3,8 +3,8 @@ package com.r3.developers.csdetemplate; import net.corda.v5.base.annotations.CordaSerializable; import net.corda.v5.base.types.MemberX500Name; -// A class which will contain a message, It must be marked with @CordaSerializable for Corda -// to be able to send from one virtual node to another. +// Where a class contains a message, mark it with @CordaSerializable to enable Corda to +// send it from one virtual node to another. @CordaSerializable public class Message { public Message(MemberX500Name sender, String message) { diff --git a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java index 21321c6..985a25e 100644 --- a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java +++ b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java @@ -18,46 +18,46 @@ import org.slf4j.LoggerFactory; // MyFirstFlow should inherit from RPCStartableFlow, which tells Corda it can be started via an RPC call public class MyFirstFlow implements RPCStartableFlow { - // It is useful to be able to log messages from the flows for debugging. + // Log messages from the flows for debugging. private final Logger log = LoggerFactory.getLogger(MyFirstFlow.class); // Corda has a set of injectable services which are injected into the flow at runtime. // Flows declare them with @CordaInjectable, then the flows have access to their services. - // JsonMarshallingService provides a Service for manipulating json + // JsonMarshallingService provides a service for manipulating JSON. @CordaInject public JsonMarshallingService jsonMarshallingService; - // FlowMessaging provides a service for establishing flow sessions between Virtual Nodes and - // sending and receiving payloads between them + // FlowMessaging establishes flow sessions between virtual nodes + // that sends and receives payloads between them. @CordaInject public FlowMessaging flowMessaging; - // MemberLookup provides a service for looking up information about members of the Virtual Network which - // this CorDapp is operating in. + // MemberLookup looks for information about members of the virtual network + // which this CorDapp operates in. @CordaInject public MemberLookup memberLookup; public MyFirstFlow() {} // When a flow is invoked its call() method is called. - // call() methods must be marked as @Suspendable, this allows Corda to pause mid-execution to wait - // for a response from the other flows and services + // Call() methods must be marked as @Suspendable, this allows Corda to pause mid-execution to wait + // for a response from the other flows and services. @NotNull @Suspendable @Override public String call(RPCRequestData requestBody) { - // Useful logging to follow what's happening in the console or logs + // Follow what happens in the console or logs. log.info("MFF: MyFirstFlow.call() called"); - // Show the requestBody in the logs - this can be used to help establish the format for starting a flow on corda + // Show the requestBody in the logs - this can be used to help establish the format for starting a flow on Corda. log.info("MFF: requestBody: " + requestBody.getRequestBody()); - // Deserialize the Json requestBody into the MyfirstFlowStartArgs class using the JsonSerialisation Service + // Deserialize the Json requestBody into the MyfirstFlowStartArgs class using the JsonSerialisation service. MyFirstFlowStartArgs flowArgs = requestBody.getRequestBodyAs(jsonMarshallingService, MyFirstFlowStartArgs.class); - // Obtain the MemberX500Name of counterparty + // Obtain the MemberX500Name of counterparty. MemberX500Name otherMember = flowArgs.otherMember; // Get our identity from the MemberLookup service. @@ -69,19 +69,19 @@ public class MyFirstFlow implements RPCStartableFlow { // Log the message to be sent. log.info("MFF: message.message: " + message.message); - // Start a flow session with the otherMember using the FlowMessaging service - // The otherMember's Virtual Node will run the corresponding MyFirstFlowResponder responder flow + // Start a flow session with the otherMember using the FlowMessaging service. + // The otherMember's virtual node will run the corresponding MyFirstFlowResponder responder flow. FlowSession session = flowMessaging.initiateFlow(otherMember); - // Send the Payload using the send method on the session to the MyFirstFlowResponder Responder flow + // Send the Payload using the send method on the session to the MyFirstFlowResponder responder flow. session.send(message); - // Receive a response from the Responder flow + // Receive a response from the responder flow. Message response = session.receive(Message.class); - // The return value of a RPCStartableFlow must always be a String, this string will be passed + // The return value of a RPCStartableFlow must always be a string. This string will pass // back as the REST RPC response when the status of the flow is queried on Corda, or as the return - // value from the flow when testing using the Simulator + // value from the flow when testing using the simulator. return response.message; } } diff --git a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlowResponder.java b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlowResponder.java index d7fba74..504e0b0 100644 --- a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlowResponder.java +++ b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlowResponder.java @@ -17,19 +17,19 @@ import org.slf4j.LoggerFactory; // Responder flows must inherit from ResponderFlow public class MyFirstFlowResponder implements ResponderFlow { - // It is useful to be able to log messages from the flows for debugging. + // Log messages from the flows for debugging. private final Logger log = LoggerFactory.getLogger(MyFirstFlowResponder.class); - // MemberLookup provides a service for looking up information about members of the Virtual Network which - // this CorDapp is operating in. + // MemberLookup looks for information about members of the virtual network which + // this CorDapp operates in. @CordaInject public MemberLookup memberLookup; public MyFirstFlowResponder() {} - // Responder flows are invoked when an initiating flow makes a call via a session set up with the Virtual - // node hosting the Responder flow. When a responder flow is invoked its call() method is called. - // call() methods must be marked as @Suspendable, this allows Corda to pause mid-execution to wait + // Responder flows are invoked when an initiating flow makes a call via a session set up with the virtual + // node hosting the responder flow. When a responder flow is invoked its call() method is called. + // Call() methods must be marked as @Suspendable, this allows Corda to pause mid-execution to wait // for a response from the other flows and services. // The Call method has the flow session passed in as a parameter by Corda so the session is available to // responder flow code, you don't need to inject the FlowMessaging service. @@ -37,10 +37,10 @@ public class MyFirstFlowResponder implements ResponderFlow { @Override public void call(FlowSession session) { - // Useful logging to follow what's happening in the console or logs + // Follow what happens in the console or logs. log.info("MFF: MyFirstResponderFlow.call() called"); - // Receive the payload and deserialize it into a Message class + // Receive the payload and deserialize it into a message class. Message receivedMessage = session.receive(Message.class); // Log the message as a proxy for performing some useful operation on it. @@ -49,7 +49,7 @@ public class MyFirstFlowResponder implements ResponderFlow { // Get our identity from the MemberLookup service. MemberX500Name ourIdentity = memberLookup.myInfo().getName(); - // Create a response to greet the sender + // Create a message to greet the sender. Message response = new Message(ourIdentity, "Hello " + session.getCounterparty().getCommonName() + ", best wishes from " + ourIdentity.getCommonName()); diff --git a/src/test/java/com/r3/developers/csdetemplate/MyFirstFlowTest.java b/src/test/java/com/r3/developers/csdetemplate/MyFirstFlowTest.java index e343318..9b45d53 100644 --- a/src/test/java/com/r3/developers/csdetemplate/MyFirstFlowTest.java +++ b/src/test/java/com/r3/developers/csdetemplate/MyFirstFlowTest.java @@ -17,32 +17,32 @@ class MyFirstFlowTest { @Test @SuppressWarnings("unchecked") public void test_that_MyFirstFLow_returns_correct_message() { - // Instantiate an instance of the Simulator + // Instantiate an instance of the simulator. Simulator simulator = new Simulator(); - // Create Alice's and Bob HoldingIDs + // Create Alice's and Bob HoldingIDs. HoldingIdentity aliceHoldingID = HoldingIdentity.Companion.create(aliceX500); HoldingIdentity bobHoldingID = HoldingIdentity.Companion.create(bobX500); - // Create Alice and Bob's virtual nodes, including the Class's of the flows which will be registered on each node. - // We don't assign Bob's virtual node to a variable because we don't need it for this particular test. + // Create Alice's and Bob's virtual nodes, including the classes of the flows which will be registered on each node. + // Don't assign Bob's virtual node to a value. You don't need it for this particular test. SimulatedVirtualNode aliceVN = simulator.createVirtualNode(aliceHoldingID, MyFirstFlow.class); simulator.createVirtualNode(bobHoldingID, MyFirstFlowResponder.class); - // Create an instance of the MyFirstFlowStartArgs which contains the request arguments for starting the flow + // Create an instance of the MyFirstFlowStartArgs which contains the request arguments for starting the flow. MyFirstFlowStartArgs myFirstFlowStartArgs = new MyFirstFlowStartArgs(bobX500); - // Create a requestData object + // Create a requestData object. RequestData requestData = RequestData.Companion.create( - "request no 1", // A unique reference for the instance of the flow request - MyFirstFlow.class, // The name of the flow class which is to be started - myFirstFlowStartArgs // The object which contains the start arguments of the flow + "request no 1", // A unique reference for the instance of the flow request. + MyFirstFlow.class, // The name of the flow class which is to be started. + myFirstFlowStartArgs // The object which contains the start arguments of the flow. ); - // Call the Flow on Alice's virtual node and capture the response from the flow + // Call the flow on Alice's virtual node and capture the response. String flowResponse = aliceVN.callFlow(requestData); - // Check that the flow has returned the expected string + // Check that the flow has returned the expected string. assert(flowResponse.equals("Hello Alice, best wishes from Bob")); } } From 370ea175e987fa8d7521bff90b22a992c7b3ed82 Mon Sep 17 00:00:00 2001 From: Niamh25 Date: Thu, 17 Nov 2022 16:34:16 +0000 Subject: [PATCH 04/10] DOC-4345: updated edited Java CSDE template code comments --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e1a62dc..b7737ee 100644 --- a/build.gradle +++ b/build.gradle @@ -94,7 +94,7 @@ dependencies { testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion" - // Optional but used by exmaple tests. + // Optional but used by example tests. testImplementation "org.mockito:mockito-core:$mockitoVersion" testImplementation "org.hamcrest:hamcrest-library:$hamcrestVersion" } From fa52064d125354653ca6c822965c1dab54e45018 Mon Sep 17 00:00:00 2001 From: Niamh25 <115650292+Niamh25@users.noreply.github.com> Date: Thu, 17 Nov 2022 17:02:19 +0000 Subject: [PATCH 05/10] Update buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java Co-authored-by: Paul Moloney <112477620+paulmoloneyr3@users.noreply.github.com> --- buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java b/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java index 3776d84..89d2891 100644 --- a/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java +++ b/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java @@ -204,7 +204,7 @@ public class CsdeRpcInterface { kong.unirest.JsonNode body = response.getBody(); // Do not retry if successful. if(status == 200) { - // Retry until you get an "OK", it may move to "Validating upload", "Persisting CPI". + // Retry until you get an "OK"; it may move to "Validating upload", "Persisting CPI". return !(body.getObject().get("status").equals("OK")); } else if (status == 400){ From f2efd50a4c68b2e1d9a87925c69c9b67a04d1166 Mon Sep 17 00:00:00 2001 From: Niamh25 <115650292+Niamh25@users.noreply.github.com> Date: Thu, 17 Nov 2022 17:02:45 +0000 Subject: [PATCH 06/10] Update src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java Co-authored-by: Paul Moloney <112477620+paulmoloneyr3@users.noreply.github.com> --- src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java index 985a25e..c2e6aea 100644 --- a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java +++ b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java @@ -29,7 +29,7 @@ public class MyFirstFlow implements RPCStartableFlow { public JsonMarshallingService jsonMarshallingService; // FlowMessaging establishes flow sessions between virtual nodes - // that sends and receives payloads between them. + // that send and receive payloads between them. @CordaInject public FlowMessaging flowMessaging; From 573c4c194980b3172eed6b063a2e5fe111b3fc1b Mon Sep 17 00:00:00 2001 From: Niamh25 <115650292+Niamh25@users.noreply.github.com> Date: Thu, 17 Nov 2022 17:02:57 +0000 Subject: [PATCH 07/10] Update src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java Co-authored-by: Paul Moloney <112477620+paulmoloneyr3@users.noreply.github.com> --- src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java index c2e6aea..ebbc43c 100644 --- a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java +++ b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java @@ -57,7 +57,7 @@ public class MyFirstFlow implements RPCStartableFlow { // Deserialize the Json requestBody into the MyfirstFlowStartArgs class using the JsonSerialisation service. MyFirstFlowStartArgs flowArgs = requestBody.getRequestBodyAs(jsonMarshallingService, MyFirstFlowStartArgs.class); - // Obtain the MemberX500Name of counterparty. + // Obtain the MemberX500Name of the counterparty. MemberX500Name otherMember = flowArgs.otherMember; // Get our identity from the MemberLookup service. From 3af97d9cbf254513dc3c1f730ffea2a4eecdd01a Mon Sep 17 00:00:00 2001 From: Niamh25 <115650292+Niamh25@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:57:55 +0000 Subject: [PATCH 08/10] Update CsdeRpcInterface.java --- buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java b/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java index 89d2891..39cdc5b 100644 --- a/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java +++ b/buildSrc/src/main/java/com/r3/csde/CsdeRpcInterface.java @@ -204,7 +204,7 @@ public class CsdeRpcInterface { kong.unirest.JsonNode body = response.getBody(); // Do not retry if successful. if(status == 200) { - // Retry until you get an "OK"; it may move to "Validating upload", "Persisting CPI". + // Retry until you get an "OK"; we may see several other responses before the "OK" response. return !(body.getObject().get("status").equals("OK")); } else if (status == 400){ @@ -299,7 +299,7 @@ public class CsdeRpcInterface { LinkedList x500Ids = getConfigX500Ids(); LinkedList OKHoldingShortIds = new LinkedList<>(); - // Check that each identity already exists. + // Create a list of X500 IDs we will not need to create VNodes for. Set existingX500 = new HashSet<>(); kong.unirest.HttpResponse vnodeListResponse = getVNodeInfo(); From d4c4f8d007b69aad8accfa7b6970ba3497b150a2 Mon Sep 17 00:00:00 2001 From: Niamh25 <115650292+Niamh25@users.noreply.github.com> Date: Tue, 6 Dec 2022 16:01:06 +0000 Subject: [PATCH 09/10] Update build.gradle --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index b7737ee..b202de6 100644 --- a/build.gradle +++ b/build.gradle @@ -63,8 +63,8 @@ repositories { // A cordaProvided declaration is required for anything that we use that the Corda API provides. // This is required to allow us to build CorDapp modules as OSGi bundles that CPI and CPB files are then built upon. dependencies { - // Declare a "platform" so that we use the correct set of dependency versions for the version of the - // Corda API specified. + // Declare a "platform" to use the correct set of dependency versions for the version that the + // Corda API specifies. cordaProvided platform("net.corda:corda-api:$cordaApiVersion") // If using transistive dependencies this will provide most of the Corda-API: From 4e6c74989f2f7a3d3c9e2399ce1390ec4c4f7eaa Mon Sep 17 00:00:00 2001 From: Niamh25 <115650292+Niamh25@users.noreply.github.com> Date: Tue, 6 Dec 2022 16:09:54 +0000 Subject: [PATCH 10/10] Update MyFirstFlow.java --- .../com/r3/developers/csdetemplate/MyFirstFlow.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java index ebbc43c..b0e5233 100644 --- a/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java +++ b/src/main/java/com/r3/developers/csdetemplate/MyFirstFlow.java @@ -28,13 +28,13 @@ public class MyFirstFlow implements RPCStartableFlow { @CordaInject public JsonMarshallingService jsonMarshallingService; - // FlowMessaging establishes flow sessions between virtual nodes + // FlowMessaging provides a service that establishes flow sessions between virtual nodes // that send and receive payloads between them. @CordaInject public FlowMessaging flowMessaging; - // MemberLookup looks for information about members of the virtual network - // which this CorDapp operates in. + // MemberLookup provides a service for looking up information about members of the virtual network which + // this CorDapp operates in. @CordaInject public MemberLookup memberLookup; @@ -79,7 +79,7 @@ public class MyFirstFlow implements RPCStartableFlow { // Receive a response from the responder flow. Message response = session.receive(Message.class); - // The return value of a RPCStartableFlow must always be a string. This string will pass + // The return value of a RPCStartableFlow must always be a String. This will be passed // back as the REST RPC response when the status of the flow is queried on Corda, or as the return // value from the flow when testing using the simulator. return response.message; @@ -96,4 +96,4 @@ RequestBody for triggering the flow via http-rpc: "otherMember":"CN=Bob, OU=Test Dept, O=R3, L=London, C=GB" } } - */ \ No newline at end of file + */