mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
Replaces keys and parties in states with AbstractParty
Switch to using AbstractParty as the standard identifier for parties in states, so that full parties can be used during construction of transactions and anonymised parties when the transaction is being added to the ledger.
This commit is contained in:
@ -11,6 +11,7 @@ import net.corda.core.days
|
||||
import net.corda.core.flows.FlowLogic
|
||||
import net.corda.core.flows.InitiatingFlow
|
||||
import net.corda.core.flows.StartableByRPC
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.node.NodeInfo
|
||||
import net.corda.core.seconds
|
||||
import net.corda.core.transactions.SignedTransaction
|
||||
@ -50,7 +51,7 @@ class SellerFlow(val otherParty: Party,
|
||||
|
||||
val notary: NodeInfo = serviceHub.networkMapCache.notaryNodes[0]
|
||||
val cpOwnerKey = serviceHub.legalIdentityKey
|
||||
val commercialPaper = selfIssueSomeCommercialPaper(cpOwnerKey.public, notary)
|
||||
val commercialPaper = selfIssueSomeCommercialPaper(serviceHub.myInfo.legalIdentity, notary)
|
||||
|
||||
progressTracker.currentStep = TRADING
|
||||
|
||||
@ -67,7 +68,7 @@ class SellerFlow(val otherParty: Party,
|
||||
}
|
||||
|
||||
@Suspendable
|
||||
fun selfIssueSomeCommercialPaper(ownedBy: PublicKey, notaryNode: NodeInfo): StateAndRef<CommercialPaper.State> {
|
||||
fun selfIssueSomeCommercialPaper(ownedBy: AbstractParty, notaryNode: NodeInfo): StateAndRef<CommercialPaper.State> {
|
||||
// Make a fake company that's issued its own paper.
|
||||
val keyPair = generateKeyPair()
|
||||
val party = Party(BOC.name, keyPair.public)
|
||||
|
Reference in New Issue
Block a user