From d8e09f7174273527a5da81268d1336fc868571de Mon Sep 17 00:00:00 2001 From: Shams Asari Date: Tue, 22 Nov 2016 14:13:45 +0000 Subject: [PATCH] Minor cleanup of attachment demo --- .gitignore | 2 ++ docs/source/running-the-demos.rst | 2 +- .../kotlin/net/corda/attachmentdemo/api/AttachmentDemoApi.kt | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 278d11b79c..07a9ac1454 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,5 @@ crashlytics-build.properties # docs related docs/virtualenv/ /logs/ + +samples/*/logs/ \ No newline at end of file diff --git a/docs/source/running-the-demos.rst b/docs/source/running-the-demos.rst index 862be9b0a6..25baeefe19 100644 --- a/docs/source/running-the-demos.rst +++ b/docs/source/running-the-demos.rst @@ -87,7 +87,7 @@ Attachment demo This demo brings up three nodes, and sends a transaction containing an attachment from one to the other. To run it from the command line (recommended for Mac/UNIX users!): -1. Run ``./gradlew samples:attachment-demo:deployNodes`` to create a set of configs and installs under ``samples/trader-demo/build/nodes`` +1. Run ``./gradlew samples:attachment-demo:deployNodes`` to create a set of configs and installs under ``samples/attachment-demo/build/nodes`` 2. Run ``./samples/attachment-demo/build/nodes/runnodes`` to open up three new terminal tabs/windows with the three nodes. 3. Run ``./gradlew samples:attachment-demo:runRecipient``, which will block waiting for something to happen. 4. Run ``./gradlew samples:attachment-demo:runSender`` in another terminal window to trigger the transaction. diff --git a/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/api/AttachmentDemoApi.kt b/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/api/AttachmentDemoApi.kt index d76253ed6d..8814939ee1 100644 --- a/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/api/AttachmentDemoApi.kt +++ b/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/api/AttachmentDemoApi.kt @@ -49,10 +49,10 @@ class AttachmentDemoApi(val services: ServiceHub) { // Send the transaction to the other recipient val tx = ptx.toSignedTransaction() - services.invokeProtocolAsync(FinalityProtocol::class.java, tx, setOf(it)).resultFuture.success { + services.invokeProtocolAsync(FinalityProtocol::class.java, tx, setOf(it)).resultFuture.success { println("Successfully sent attachment with the FinalityProtocol") }.failure { - logger.error("Failed to send attachment with the FinalityProtocol") + logger.error("Failed to send attachment with the FinalityProtocol", it) } Response.accepted().build()