Assorted set of clean ups (#4039)

This commit is contained in:
Shams Asari
2018-10-05 18:05:10 +01:00
committed by GitHub
parent 0621efe7c6
commit 39434dcbec
13 changed files with 61 additions and 121 deletions

View File

@ -66,11 +66,11 @@ public class IOUFlow extends FlowLogic<Void> {
final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);
// Creating a session with the other party.
FlowSession otherpartySession = initiateFlow(otherParty);
FlowSession otherPartySession = initiateFlow(otherParty);
// Obtaining the counterparty's signature.
SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(
signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));
signedTx, ImmutableList.of(otherPartySession), CollectSignaturesFlow.tracker()));
// Finalising the transaction.
subFlow(new FinalityFlow(fullySignedTx));
@ -78,4 +78,4 @@ public class IOUFlow extends FlowLogic<Void> {
return null;
// DOCEND 02
}
}
}

View File

@ -1,3 +1,5 @@
@file:Suppress("MemberVisibilityCanBePrivate")
package net.corda.docs.kotlin.tutorial.helloworld
import net.corda.core.contracts.ContractState
@ -12,4 +14,4 @@ class IOUState(val value: Int,
val borrower: Party) : ContractState {
override val participants get() = listOf(lender, borrower)
}
// DOCEND 01
// DOCEND 01

View File

@ -1,3 +1,5 @@
@file:Suppress("MemberVisibilityCanBePrivate")
package net.corda.docs.kotlin.tutorial.twoparty
// DOCSTART 01
@ -48,13 +50,13 @@ class IOUFlow(val iouValue: Int,
val signedTx = serviceHub.signInitialTransaction(txBuilder)
// Creating a session with the other party.
val otherpartySession = initiateFlow(otherParty)
val otherPartySession = initiateFlow(otherParty)
// Obtaining the counterparty's signature.
val fullySignedTx = subFlow(CollectSignaturesFlow(signedTx, listOf(otherpartySession), CollectSignaturesFlow.tracker()))
val fullySignedTx = subFlow(CollectSignaturesFlow(signedTx, listOf(otherPartySession), CollectSignaturesFlow.tracker()))
// Finalising the transaction.
subFlow(FinalityFlow(fullySignedTx))
// DOCEND 02
}
}
}

View File

@ -1,3 +1,5 @@
@file:Suppress("unused")
package net.corda.docs.kotlin.tutorial.twoparty
import co.paralleluniverse.fibers.Suspendable
@ -30,4 +32,4 @@ class IOUFlowResponder(val otherPartySession: FlowSession) : FlowLogic<Unit>() {
subFlow(signTransactionFlow)
}
}
// DOCEND 01
// DOCEND 01