mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
Assorted set of clean ups (#4039)
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.corda.docs
|
||||
package net.corda.docs.kotlin
|
||||
|
||||
import net.corda.core.contracts.Amount
|
||||
import net.corda.core.contracts.ContractState
|
||||
@ -8,7 +8,6 @@ import net.corda.core.node.services.vault.*
|
||||
import net.corda.core.utilities.OpaqueBytes
|
||||
import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.docs.java.tutorial.helloworld.IOUFlow
|
||||
import net.corda.docs.kotlin.TopupIssuerFlow
|
||||
import net.corda.finance.*
|
||||
import net.corda.finance.contracts.getCashBalances
|
||||
import net.corda.finance.flows.CashIssueFlow
|
@ -1,18 +1,12 @@
|
||||
package net.corda.docs
|
||||
package net.corda.docs.kotlin
|
||||
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.toFuture
|
||||
import net.corda.core.utilities.OpaqueBytes
|
||||
import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.docs.kotlin.ForeignExchangeFlow
|
||||
import net.corda.docs.kotlin.ForeignExchangeRemoteFlow
|
||||
import net.corda.finance.DOLLARS
|
||||
import net.corda.finance.GBP
|
||||
import net.corda.finance.POUNDS
|
||||
import net.corda.finance.USD
|
||||
import net.corda.finance.*
|
||||
import net.corda.finance.contracts.getCashBalances
|
||||
import net.corda.finance.flows.CashIssueFlow
|
||||
import net.corda.finance.issuedBy
|
||||
import net.corda.testing.core.singleIdentity
|
||||
import net.corda.testing.node.MockNetwork
|
||||
import net.corda.testing.node.StartedMockNode
|
@ -1,4 +1,4 @@
|
||||
package net.corda.docs
|
||||
package net.corda.docs.kotlin
|
||||
|
||||
import net.corda.core.contracts.LinearState
|
||||
import net.corda.core.contracts.StateAndRef
|
||||
@ -9,10 +9,6 @@ import net.corda.core.node.services.queryBy
|
||||
import net.corda.core.node.services.vault.QueryCriteria
|
||||
import net.corda.core.toFuture
|
||||
import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.docs.kotlin.SubmitCompletionFlow
|
||||
import net.corda.docs.kotlin.SubmitTradeApprovalFlow
|
||||
import net.corda.docs.kotlin.TradeApprovalContract
|
||||
import net.corda.docs.kotlin.WorkflowState
|
||||
import net.corda.testing.core.ALICE_NAME
|
||||
import net.corda.testing.core.BOB_NAME
|
||||
import net.corda.testing.node.MockNetwork
|
Reference in New Issue
Block a user