Skip to content

Commit

Permalink
Add regulator node to IRS demo (corda#2015)
Browse files Browse the repository at this point in the history
* Add regulator node to IRS demo

* Revert API structure changes to ReceiveTransactionFlow

Manually specify constructors to ReceiveTransactionFlow instead of using JvmOverloads,
to ensure this behaves exactly as previously, rather than depending on Kotlin's
generated constructors.
  • Loading branch information
Ross Nicoll authored and Katelyn Baker committed Nov 8, 2017
1 parent f99cae3 commit 6803571
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ import java.security.SignatureException
* @property checkSufficientSignatures if true checks all required signatures are present. See [SignedTransaction.verify].
* @property statesToRecord which transaction states should be recorded in the vault, if any.
*/
class ReceiveTransactionFlow @JvmOverloads constructor(private val otherSideSession: FlowSession,
private val checkSufficientSignatures: Boolean = true,
private val statesToRecord: StatesToRecord = StatesToRecord.NONE) : FlowLogic<SignedTransaction>() {
class ReceiveTransactionFlow(private val otherSideSession: FlowSession,
private val checkSufficientSignatures: Boolean,
private val statesToRecord: StatesToRecord) : FlowLogic<SignedTransaction>() {
/** Receives a [SignedTransaction] from [otherSideSession], verifies it and then records it in the vault. */
constructor(otherSideSession: FlowSession, checkSufficientSignatures: Boolean) : this(otherSideSession, checkSufficientSignatures, StatesToRecord.NONE)
/** Receives a [SignedTransaction] from [otherSideSession], verifies it and then records it in the vault. */
constructor(otherSideSession: FlowSession) : this(otherSideSession, true)

@Suppress("KDocMissingDocumentation")
@Suspendable
@Throws(SignatureException::class,
Expand Down
9 changes: 9 additions & 0 deletions samples/irs-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
cordapps = ["net.corda:finance:$corda_release_version"]
useTestClock true
}
node {
name "O=Regulator,L=New York,C=US"
advertisedServices = []
p2pPort 10011
rpcPort 10012
webPort 10013
cordapps = ["net.corda:finance:$corda_release_version"]
useTestClock true
}
}

task integrationTest(type: Test, dependsOn: []) {
Expand Down

0 comments on commit 6803571

Please sign in to comment.