mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
Replace Party with Party.Full
Replace Party with Party.Full as an interim step to introducing the Party.Anonymised class. Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
This commit is contained in:
@ -17,7 +17,7 @@ import net.corda.node.services.persistence.NodeAttachmentService
|
||||
import java.nio.file.Path
|
||||
import java.util.*
|
||||
|
||||
class BuyerFlow(val otherParty: Party,
|
||||
class BuyerFlow(val otherParty: Party.Full,
|
||||
private val attachmentsPath: Path,
|
||||
override val progressTracker: ProgressTracker = ProgressTracker(STARTING_BUY)) : FlowLogic<Unit>() {
|
||||
|
||||
|
@ -16,10 +16,10 @@ import net.corda.flows.TwoPartyTradeFlow
|
||||
import java.time.Instant
|
||||
import java.util.*
|
||||
|
||||
class SellerFlow(val otherParty: Party,
|
||||
class SellerFlow(val otherParty: Party.Full,
|
||||
val amount: Amount<Currency>,
|
||||
override val progressTracker: ProgressTracker) : FlowLogic<SignedTransaction>() {
|
||||
constructor(otherParty: Party, amount: Amount<Currency>) : this(otherParty, amount, tracker())
|
||||
constructor(otherParty: Party.Full, amount: Amount<Currency>) : this(otherParty, amount, tracker())
|
||||
|
||||
companion object {
|
||||
val PROSPECTUS_HASH = SecureHash.parse("decd098666b9657314870e192ced0c3519c2c9d395507a238338f8d003929de9")
|
||||
@ -65,7 +65,7 @@ class SellerFlow(val otherParty: Party,
|
||||
fun selfIssueSomeCommercialPaper(ownedBy: CompositeKey, notaryNode: NodeInfo): StateAndRef<CommercialPaper.State> {
|
||||
// Make a fake company that's issued its own paper.
|
||||
val keyPair = generateKeyPair()
|
||||
val party = Party("Bank of London", keyPair.public)
|
||||
val party = Party.Full("Bank of London", keyPair.public)
|
||||
|
||||
val issuance: SignedTransaction = run {
|
||||
val tx = CommercialPaper().generateIssue(party.ref(1, 2, 3), 1100.DOLLARS `issued by` DUMMY_CASH_ISSUER,
|
||||
|
@ -12,7 +12,7 @@ import java.util.function.Function
|
||||
class TraderDemoPlugin : CordaPluginRegistry() {
|
||||
// A list of Flows that are required for this cordapp
|
||||
override val requiredFlows: Map<String, Set<String>> = mapOf(
|
||||
SellerFlow::class.java.name to setOf(Party::class.java.name, Amount::class.java.name)
|
||||
SellerFlow::class.java.name to setOf(Party.Full::class.java.name, Amount::class.java.name)
|
||||
)
|
||||
override val servicePlugins = listOf(Function(BuyerFlow::Service))
|
||||
}
|
||||
|
Reference in New Issue
Block a user