mirror of
https://github.com/corda/corda.git
synced 2025-01-26 06:09:25 +00:00
Minor cleanup of attachment demo
This commit is contained in:
parent
45d54bec39
commit
d8e09f7174
2
.gitignore
vendored
2
.gitignore
vendored
@ -78,3 +78,5 @@ crashlytics-build.properties
|
||||
# docs related
|
||||
docs/virtualenv/
|
||||
/logs/
|
||||
|
||||
samples/*/logs/
|
@ -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.
|
||||
|
@ -49,10 +49,10 @@ class AttachmentDemoApi(val services: ServiceHub) {
|
||||
|
||||
// Send the transaction to the other recipient
|
||||
val tx = ptx.toSignedTransaction()
|
||||
services.invokeProtocolAsync<Unit>(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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user