Rename the package to com.r3.corda.enterprise.perftestcordapp

This commit is contained in:
Christian Sailer 2017-10-17 11:58:08 +01:00
parent 1241c79d7c
commit d0a7ce3a4e
23 changed files with 96 additions and 95 deletions

View File

@ -1,6 +1,6 @@
@file:JvmName("PtCurrencies") @file:JvmName("PtCurrencies")
package net.corda.ptflows package com.r3.corda.enterprise.perftestcordapp
import net.corda.core.contracts.Amount import net.corda.core.contracts.Amount
import net.corda.core.contracts.Issued import net.corda.core.contracts.Issued

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.contracts package com.r3.corda.enterprise.perftestcordapp.contracts
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
@ -15,9 +15,9 @@ import net.corda.core.schemas.PersistentState
import net.corda.core.schemas.QueryableState import net.corda.core.schemas.QueryableState
import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.LedgerTransaction
import net.corda.core.transactions.TransactionBuilder import net.corda.core.transactions.TransactionBuilder
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.ptflows.schemas.PtCommercialPaperSchemaV1 import com.r3.corda.enterprise.perftestcordapp.schemas.PtCommercialPaperSchemaV1
import net.corda.ptflows.utils.sumCashBy import com.r3.corda.enterprise.perftestcordapp.utils.sumCashBy
import java.time.Instant import java.time.Instant
import java.util.* import java.util.*
@ -43,12 +43,12 @@ import java.util.*
* to do this in the Apache BVal project). * to do this in the Apache BVal project).
*/ */
val CP_PROGRAM_ID = "net.corda.ptflows.contracts.PtCommercialPaper" val CP_PROGRAM_ID = "com.r3.corda.enterprise.perftestcordapp.contracts.PtCommercialPaper"
// TODO: Generalise the notion of an owned instrument into a superclass/supercontract. Consider composition vs inheritance. // TODO: Generalise the notion of an owned instrument into a superclass/supercontract. Consider composition vs inheritance.
class PtCommercialPaper : Contract { class PtCommercialPaper : Contract {
companion object { companion object {
const val CP_PROGRAM_ID: ContractClassName = "net.corda.ptflows.contracts.PtCommercialPaper" const val CP_PROGRAM_ID: ContractClassName = "com.r3.corda.enterprise.perftestcordapp.contracts.PtCommercialPaper"
} }
data class State( data class State(
val issuance: PartyAndReference, val issuance: PartyAndReference,

View File

@ -1,5 +1,5 @@
// So the static extension functions get put into a class with a better name than CashKt // So the static extension functions get put into a class with a better name than CashKt
package net.corda.ptflows.contracts.asset package com.r3.corda.enterprise.perftestcordapp.contracts.asset
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.core.contracts.* import net.corda.core.contracts.*
@ -19,10 +19,10 @@ import net.corda.core.transactions.LedgerTransaction
import net.corda.core.transactions.TransactionBuilder import net.corda.core.transactions.TransactionBuilder
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.core.utilities.toBase58String import net.corda.core.utilities.toBase58String
import net.corda.ptflows.schemas.PtCashSchemaV1 import com.r3.corda.enterprise.perftestcordapp.schemas.PtCashSchemaV1
import net.corda.ptflows.utils.sumCash import com.r3.corda.enterprise.perftestcordapp.utils.sumCash
import net.corda.ptflows.utils.sumCashOrNull import com.r3.corda.enterprise.perftestcordapp.utils.sumCashOrNull
import net.corda.ptflows.utils.sumCashOrZero import com.r3.corda.enterprise.perftestcordapp.utils.sumCashOrZero
import java.math.BigInteger import java.math.BigInteger
import java.security.PublicKey import java.security.PublicKey
import java.sql.DatabaseMetaData import java.sql.DatabaseMetaData
@ -53,7 +53,7 @@ interface PtCashSelection {
instance.set(cashSelectionAlgo) instance.set(cashSelectionAlgo)
cashSelectionAlgo cashSelectionAlgo
} ?: throw ClassNotFoundException("\nUnable to load compatible cash selection algorithm implementation for JDBC driver ($_metadata)." + } ?: throw ClassNotFoundException("\nUnable to load compatible cash selection algorithm implementation for JDBC driver ($_metadata)." +
"\nPlease specify an implementation in META-INF/services/net.corda.ptflows.contracts.asset.PtCashSelection") "\nPlease specify an implementation in META-INF/services/com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCashSelection")
}.invoke() }.invoke()
} }
} }
@ -261,7 +261,7 @@ class PtCash : PtOnLedgerAsset<Currency, PtCash.Commands, PtCash.State>() {
} }
companion object { companion object {
const val PROGRAM_ID: ContractClassName = "net.corda.ptflows.contracts.asset.PtCash" const val PROGRAM_ID: ContractClassName = "com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash"
/** /**
* Generate a transaction that moves an amount of currency to the given party, and sends any change back to * Generate a transaction that moves an amount of currency to the given party, and sends any change back to

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.contracts.asset package com.r3.corda.enterprise.perftestcordapp.contracts.asset
import net.corda.core.contracts.* import net.corda.core.contracts.*

View File

@ -1,8 +1,10 @@
package net.corda.ptflows.contracts.asset.cash.selection package com.r3.corda.enterprise.perftestcordapp.contracts.asset.cash.selection
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import co.paralleluniverse.strands.Strand import co.paralleluniverse.strands.Strand
import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCashSelection
import net.corda.core.contracts.Amount import net.corda.core.contracts.Amount
import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.StateAndRef
import net.corda.core.contracts.StateRef import net.corda.core.contracts.StateRef
@ -15,8 +17,6 @@ import net.corda.core.node.services.StatesNotAvailableException
import net.corda.core.serialization.SerializationDefaults import net.corda.core.serialization.SerializationDefaults
import net.corda.core.serialization.deserialize import net.corda.core.serialization.deserialize
import net.corda.core.utilities.* import net.corda.core.utilities.*
import net.corda.ptflows.contracts.asset.PtCash
import net.corda.ptflows.contracts.asset.PtCashSelection
import java.sql.DatabaseMetaData import java.sql.DatabaseMetaData
import java.sql.SQLException import java.sql.SQLException
import java.util.* import java.util.*

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.flows package com.r3.corda.enterprise.perftestcordapp.flows
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.core.contracts.Amount import net.corda.core.contracts.Amount

View File

@ -1,14 +1,14 @@
package net.corda.ptflows.flows package com.r3.corda.enterprise.perftestcordapp.flows
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.core.flows.FlowException import net.corda.core.flows.FlowException
import net.corda.core.flows.FlowLogic import net.corda.core.flows.FlowLogic
import net.corda.core.flows.StartableByRPC import net.corda.core.flows.StartableByRPC
import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.CordaSerializable
import net.corda.ptflows.CHF import com.r3.corda.enterprise.perftestcordapp.CHF
import net.corda.ptflows.EUR import com.r3.corda.enterprise.perftestcordapp.EUR
import net.corda.ptflows.GBP import com.r3.corda.enterprise.perftestcordapp.GBP
import net.corda.ptflows.USD import com.r3.corda.enterprise.perftestcordapp.USD
import java.util.* import java.util.*
/** /**

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.flows package com.r3.corda.enterprise.perftestcordapp.flows
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.core.contracts.Amount import net.corda.core.contracts.Amount
@ -13,9 +13,9 @@ import net.corda.core.serialization.CordaSerializable
import net.corda.core.transactions.TransactionBuilder import net.corda.core.transactions.TransactionBuilder
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.core.utilities.ProgressTracker import net.corda.core.utilities.ProgressTracker
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.ptflows.contracts.asset.PtCashSelection import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCashSelection
import net.corda.ptflows.issuedBy import com.r3.corda.enterprise.perftestcordapp.issuedBy
import java.util.* import java.util.*
/** /**

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.flows package com.r3.corda.enterprise.perftestcordapp.flows
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.core.contracts.Amount import net.corda.core.contracts.Amount

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.flows package com.r3.corda.enterprise.perftestcordapp.flows
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.core.contracts.Amount import net.corda.core.contracts.Amount
@ -8,8 +8,8 @@ import net.corda.core.serialization.CordaSerializable
import net.corda.core.transactions.TransactionBuilder import net.corda.core.transactions.TransactionBuilder
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.core.utilities.ProgressTracker import net.corda.core.utilities.ProgressTracker
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.ptflows.issuedBy import com.r3.corda.enterprise.perftestcordapp.issuedBy
import java.util.* import java.util.*
/** /**

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.flows package com.r3.corda.enterprise.perftestcordapp.flows
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.confidential.SwapIdentitiesFlow import net.corda.confidential.SwapIdentitiesFlow
@ -10,7 +10,7 @@ import net.corda.core.identity.Party
import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.CordaSerializable
import net.corda.core.transactions.TransactionBuilder import net.corda.core.transactions.TransactionBuilder
import net.corda.core.utilities.ProgressTracker import net.corda.core.utilities.ProgressTracker
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import java.util.* import java.util.*
/** /**

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.flows package com.r3.corda.enterprise.perftestcordapp.flows
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.confidential.IdentitySyncFlow import net.corda.confidential.IdentitySyncFlow
@ -12,8 +12,8 @@ import net.corda.core.transactions.TransactionBuilder
import net.corda.core.utilities.ProgressTracker import net.corda.core.utilities.ProgressTracker
import net.corda.core.utilities.seconds import net.corda.core.utilities.seconds
import net.corda.core.utilities.unwrap import net.corda.core.utilities.unwrap
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.ptflows.utils.sumCashBy import com.r3.corda.enterprise.perftestcordapp.utils.sumCashBy
import java.security.PublicKey import java.security.PublicKey
import java.util.* import java.util.*

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.schemas package com.r3.corda.enterprise.perftestcordapp.schemas
import net.corda.core.identity.AbstractParty import net.corda.core.identity.AbstractParty

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.schemas package com.r3.corda.enterprise.perftestcordapp.schemas
import net.corda.core.schemas.MappedSchema import net.corda.core.schemas.MappedSchema
import net.corda.core.schemas.PersistentState import net.corda.core.schemas.PersistentState
import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.CordaSerializable

View File

@ -1,5 +1,6 @@
package net.corda.ptflows.utils package com.r3.corda.enterprise.perftestcordapp.utils
import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.core.contracts.Amount import net.corda.core.contracts.Amount
import net.corda.core.contracts.Amount.Companion.sumOrNull import net.corda.core.contracts.Amount.Companion.sumOrNull
import net.corda.core.contracts.Amount.Companion.sumOrThrow import net.corda.core.contracts.Amount.Companion.sumOrThrow
@ -15,20 +16,20 @@ import java.util.*
* if there are none, or if any of the cash states cannot be added together (i.e. are * if there are none, or if any of the cash states cannot be added together (i.e. are
* different currencies or issuers). * different currencies or issuers).
*/ */
fun Iterable<ContractState>.sumCashBy(owner: AbstractParty): Amount<Issued<Currency>> = filterIsInstance<net.corda.ptflows.contracts.asset.PtCash.State>().filter { it.owner == owner }.map { it.amount }.sumOrThrow() fun Iterable<ContractState>.sumCashBy(owner: AbstractParty): Amount<Issued<Currency>> = filterIsInstance<PtCash.State>().filter { it.owner == owner }.map { it.amount }.sumOrThrow()
/** /**
* Sums the cash states in the list, throwing an exception if there are none, or if any of the cash * Sums the cash states in the list, throwing an exception if there are none, or if any of the cash
* states cannot be added together (i.e. are different currencies or issuers). * states cannot be added together (i.e. are different currencies or issuers).
*/ */
fun Iterable<ContractState>.sumCash(): Amount<Issued<Currency>> = filterIsInstance<net.corda.ptflows.contracts.asset.PtCash.State>().map { it.amount }.sumOrThrow() fun Iterable<ContractState>.sumCash(): Amount<Issued<Currency>> = filterIsInstance<PtCash.State>().map { it.amount }.sumOrThrow()
/** Sums the cash states in the list, returning null if there are none. */ /** Sums the cash states in the list, returning null if there are none. */
fun Iterable<ContractState>.sumCashOrNull(): Amount<Issued<Currency>>? = filterIsInstance<net.corda.ptflows.contracts.asset.PtCash.State>().map { it.amount }.sumOrNull() fun Iterable<ContractState>.sumCashOrNull(): Amount<Issued<Currency>>? = filterIsInstance<PtCash.State>().map { it.amount }.sumOrNull()
/** Sums the cash states in the list, returning zero of the given currency+issuer if there are none. */ /** Sums the cash states in the list, returning zero of the given currency+issuer if there are none. */
fun Iterable<ContractState>.sumCashOrZero(currency: Issued<Currency>): Amount<Issued<Currency>> { fun Iterable<ContractState>.sumCashOrZero(currency: Issued<Currency>): Amount<Issued<Currency>> {
return filterIsInstance<net.corda.ptflows.contracts.asset.PtCash.State>().map { it.amount }.sumOrZero(currency) return filterIsInstance<PtCash.State>().map { it.amount }.sumOrZero(currency)
} }
/** Sums the asset states in the list, returning null if there are none. */ /** Sums the asset states in the list, returning null if there are none. */

View File

@ -0,0 +1,2 @@
com.r3.corda.enterprise.perftestcordapp.contracts.asset.cash.selection.PtCashSelectionH2Impl

View File

@ -1,2 +0,0 @@
net.corda.ptflows.contracts.asset.cash.selection.PtCashSelectionH2Impl

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.contracts package com.r3.corda.enterprise.perftestcordapp.contracts
import net.corda.core.contracts.* import net.corda.core.contracts.*
import net.corda.core.identity.AnonymousParty import net.corda.core.identity.AnonymousParty
@ -9,11 +9,11 @@ import net.corda.core.transactions.SignedTransaction
import net.corda.core.transactions.TransactionBuilder import net.corda.core.transactions.TransactionBuilder
import net.corda.core.utilities.days import net.corda.core.utilities.days
import net.corda.core.utilities.seconds import net.corda.core.utilities.seconds
import net.corda.ptflows.DOLLARS import com.r3.corda.enterprise.perftestcordapp.DOLLARS
import net.corda.ptflows.`issued by` import com.r3.corda.enterprise.perftestcordapp.`issued by`
import net.corda.ptflows.contracts.asset.* import com.r3.corda.enterprise.perftestcordapp.contracts.asset.*
import net.corda.testing.* import net.corda.testing.*
import net.corda.ptflows.contracts.asset.fillWithSomeTestCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.fillWithSomeTestCash
import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices
import org.junit.Ignore import org.junit.Ignore
import org.junit.Test import org.junit.Test

View File

@ -1,6 +1,11 @@
package net.corda.ptflows.contracts.asset package com.r3.corda.enterprise.perftestcordapp.contracts.asset
import com.r3.corda.enterprise.perftestcordapp.*
import com.r3.corda.enterprise.perftestcordapp.utils.sumCash
import com.r3.corda.enterprise.perftestcordapp.utils.sumCashBy
import com.r3.corda.enterprise.perftestcordapp.utils.sumCashOrNull
import com.r3.corda.enterprise.perftestcordapp.utils.sumCashOrZero
import net.corda.core.contracts.* import net.corda.core.contracts.*
import net.corda.core.crypto.SecureHash import net.corda.core.crypto.SecureHash
import net.corda.core.crypto.generateKeyPair import net.corda.core.crypto.generateKeyPair
@ -15,11 +20,6 @@ import net.corda.core.transactions.SignedTransaction
import net.corda.core.transactions.TransactionBuilder import net.corda.core.transactions.TransactionBuilder
import net.corda.core.transactions.WireTransaction import net.corda.core.transactions.WireTransaction
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.ptflows.*
import net.corda.ptflows.utils.sumCash
import net.corda.ptflows.utils.sumCashBy
import net.corda.ptflows.utils.sumCashOrNull
import net.corda.ptflows.utils.sumCashOrZero
import net.corda.node.services.vault.NodeVaultService import net.corda.node.services.vault.NodeVaultService
import net.corda.node.utilities.CordaPersistence import net.corda.node.utilities.CordaPersistence
import net.corda.testing.* import net.corda.testing.*
@ -103,8 +103,8 @@ class PtCashTests : TestDependencyInjectionBase() {
@Before @Before
fun setUp() { fun setUp() {
LogHelper.setLevel(NodeVaultService::class) LogHelper.setLevel(NodeVaultService::class)
megaCorpServices = MockServices(listOf("net.corda.ptflows.contracts.asset"), MEGA_CORP_KEY) megaCorpServices = MockServices(listOf("com.r3.corda.enterprise.perftestcordapp.contracts.asset"), MEGA_CORP_KEY)
val databaseAndServices = makeTestDatabaseAndMockServices(cordappPackages = listOf("net.corda.ptflows.contracts.asset"), keys = listOf(MINI_CORP_KEY, MEGA_CORP_KEY, OUR_KEY)) val databaseAndServices = makeTestDatabaseAndMockServices(cordappPackages = listOf("com.r3.corda.enterprise.perftestcordapp.contracts.asset"), keys = listOf(MINI_CORP_KEY, MEGA_CORP_KEY, OUR_KEY))
database = databaseAndServices.first database = databaseAndServices.first
miniCorpServices = databaseAndServices.second miniCorpServices = databaseAndServices.second
@ -145,7 +145,7 @@ class PtCashTests : TestDependencyInjectionBase() {
output(PtCash.PROGRAM_ID) { outState } output(PtCash.PROGRAM_ID) { outState }
command(ALICE_PUBKEY) { DummyCommandData } command(ALICE_PUBKEY) { DummyCommandData }
// Invalid command // Invalid command
this `fails with` "required net.corda.ptflows.contracts.asset.PtCash.Commands.Move command" this `fails with` "required com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash.Commands.Move command"
} }
tweak { tweak {
output(PtCash.PROGRAM_ID) { outState } output(PtCash.PROGRAM_ID) { outState }
@ -429,7 +429,7 @@ class PtCashTests : TestDependencyInjectionBase() {
tweak { tweak {
command(MEGA_CORP_PUBKEY) { PtCash.Commands.Exit(200.DOLLARS `issued by` defaultIssuer) } command(MEGA_CORP_PUBKEY) { PtCash.Commands.Exit(200.DOLLARS `issued by` defaultIssuer) }
this `fails with` "required net.corda.ptflows.contracts.asset.PtCash.Commands.Move command" this `fails with` "required com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash.Commands.Move command"
tweak { tweak {
command(MEGA_CORP_PUBKEY) { PtCash.Commands.Move() } command(MEGA_CORP_PUBKEY) { PtCash.Commands.Move() }

View File

@ -1,14 +1,14 @@
package net.corda.ptflows.contracts.flows package com.r3.corda.enterprise.perftestcordapp.contracts.flows
import net.corda.core.identity.Party import net.corda.core.identity.Party
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.getOrThrow
import net.corda.ptflows.flows.PtCashException import com.r3.corda.enterprise.perftestcordapp.flows.PtCashException
import net.corda.ptflows.flows.PtCashExitFlow import com.r3.corda.enterprise.perftestcordapp.flows.PtCashExitFlow
import net.corda.ptflows.flows.PtCashIssueFlow import com.r3.corda.enterprise.perftestcordapp.flows.PtCashIssueFlow
import net.corda.ptflows.DOLLARS import com.r3.corda.enterprise.perftestcordapp.DOLLARS
import net.corda.ptflows.`issued by` import com.r3.corda.enterprise.perftestcordapp.`issued by`
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.node.internal.StartedNode import net.corda.node.internal.StartedNode
import net.corda.testing.chooseIdentity import net.corda.testing.chooseIdentity
import net.corda.testing.getDefaultNotary import net.corda.testing.getDefaultNotary
@ -34,7 +34,7 @@ class CashExitFlowTests {
@Before @Before
fun start() { fun start() {
setCordappPackages("net.corda.ptflows.contracts.asset") setCordappPackages("com.r3.corda.enterprise.perftestcordapp.contracts.asset")
mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin()) mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin())
val nodes = mockNet.createSomeNodes(1) val nodes = mockNet.createSomeNodes(1)
notaryNode = nodes.notaryNode notaryNode = nodes.notaryNode

View File

@ -1,13 +1,13 @@
package net.corda.ptflows.contracts.flows package com.r3.corda.enterprise.perftestcordapp.contracts.flows
import net.corda.core.identity.Party import net.corda.core.identity.Party
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.getOrThrow
import net.corda.ptflows.DOLLARS import com.r3.corda.enterprise.perftestcordapp.DOLLARS
import net.corda.ptflows.`issued by` import com.r3.corda.enterprise.perftestcordapp.`issued by`
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.node.internal.StartedNode import net.corda.node.internal.StartedNode
import net.corda.ptflows.flows.PtCashIssueFlow import com.r3.corda.enterprise.perftestcordapp.flows.PtCashIssueFlow
import net.corda.testing.chooseIdentity import net.corda.testing.chooseIdentity
import net.corda.testing.getDefaultNotary import net.corda.testing.getDefaultNotary
import net.corda.testing.node.InMemoryMessagingNetwork.ServicePeerAllocationStrategy.RoundRobin import net.corda.testing.node.InMemoryMessagingNetwork.ServicePeerAllocationStrategy.RoundRobin
@ -29,7 +29,7 @@ class CashIssueFlowTests {
@Before @Before
fun start() { fun start() {
setCordappPackages("net.corda.ptflows.contracts.asset") setCordappPackages("com.r3.corda.enterprise.perftestcordapp.contracts.asset")
mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin()) mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin())
val nodes = mockNet.createSomeNodes(1) val nodes = mockNet.createSomeNodes(1)
notaryNode = nodes.notaryNode notaryNode = nodes.notaryNode

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.contracts.flows package com.r3.corda.enterprise.perftestcordapp.contracts.flows
import net.corda.core.identity.Party import net.corda.core.identity.Party
import net.corda.core.node.services.Vault import net.corda.core.node.services.Vault
@ -6,12 +6,12 @@ import net.corda.core.node.services.trackBy
import net.corda.core.node.services.vault.QueryCriteria import net.corda.core.node.services.vault.QueryCriteria
import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.OpaqueBytes
import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.getOrThrow
import net.corda.ptflows.DOLLARS import com.r3.corda.enterprise.perftestcordapp.DOLLARS
import net.corda.ptflows.`issued by` import com.r3.corda.enterprise.perftestcordapp.`issued by`
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.ptflows.flows.PtCashException import com.r3.corda.enterprise.perftestcordapp.flows.PtCashException
import net.corda.ptflows.flows.PtCashIssueFlow import com.r3.corda.enterprise.perftestcordapp.flows.PtCashIssueFlow
import net.corda.ptflows.flows.PtCashPaymentFlow import com.r3.corda.enterprise.perftestcordapp.flows.PtCashPaymentFlow
import net.corda.node.internal.StartedNode import net.corda.node.internal.StartedNode
import net.corda.testing.chooseIdentity import net.corda.testing.chooseIdentity
import net.corda.testing.expect import net.corda.testing.expect
@ -38,7 +38,7 @@ class CashPaymentFlowTests {
@Before @Before
fun start() { fun start() {
setCordappPackages("net.corda.ptflows.contracts.asset") setCordappPackages("com.r3.corda.enterprise.perftestcordapp.contracts.asset")
mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin()) mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin())
val nodes = mockNet.createSomeNodes(1) val nodes = mockNet.createSomeNodes(1)
notaryNode = nodes.notaryNode notaryNode = nodes.notaryNode

View File

@ -1,4 +1,4 @@
package net.corda.ptflows.contracts.flows package com.r3.corda.enterprise.perftestcordapp.contracts.flows
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.core.concurrent.CordaFuture import net.corda.core.concurrent.CordaFuture
@ -26,15 +26,15 @@ import net.corda.core.utilities.days
import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.getOrThrow
import net.corda.core.utilities.toNonEmptySet import net.corda.core.utilities.toNonEmptySet
import net.corda.core.utilities.unwrap import net.corda.core.utilities.unwrap
import net.corda.ptflows.DOLLARS import com.r3.corda.enterprise.perftestcordapp.DOLLARS
import net.corda.ptflows.`issued by` import com.r3.corda.enterprise.perftestcordapp.`issued by`
import net.corda.ptflows.contracts.PtCommercialPaper import com.r3.corda.enterprise.perftestcordapp.contracts.PtCommercialPaper
import net.corda.ptflows.contracts.asset.CASH import com.r3.corda.enterprise.perftestcordapp.contracts.asset.CASH
import net.corda.ptflows.contracts.asset.PtCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash
import net.corda.ptflows.contracts.asset.`issued by` import com.r3.corda.enterprise.perftestcordapp.contracts.asset.`issued by`
import net.corda.ptflows.contracts.asset.`owned by` import com.r3.corda.enterprise.perftestcordapp.contracts.asset.`owned by`
import net.corda.ptflows.flows.TwoPartyTradeFlow.Buyer import com.r3.corda.enterprise.perftestcordapp.flows.TwoPartyTradeFlow.Buyer
import net.corda.ptflows.flows.TwoPartyTradeFlow.Seller import com.r3.corda.enterprise.perftestcordapp.flows.TwoPartyTradeFlow.Seller
import net.corda.node.internal.StartedNode import net.corda.node.internal.StartedNode
import net.corda.node.services.api.WritableTransactionStorage import net.corda.node.services.api.WritableTransactionStorage
import net.corda.node.services.config.NodeConfiguration import net.corda.node.services.config.NodeConfiguration
@ -42,7 +42,7 @@ import net.corda.node.services.persistence.DBTransactionStorage
import net.corda.node.utilities.CordaPersistence import net.corda.node.utilities.CordaPersistence
import net.corda.nodeapi.internal.ServiceInfo import net.corda.nodeapi.internal.ServiceInfo
import net.corda.testing.* import net.corda.testing.*
import net.corda.ptflows.contracts.asset.fillWithSomeTestCash import com.r3.corda.enterprise.perftestcordapp.contracts.asset.fillWithSomeTestCash
import net.corda.testing.node.InMemoryMessagingNetwork import net.corda.testing.node.InMemoryMessagingNetwork
import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetwork
import net.corda.testing.node.pumpReceive import net.corda.testing.node.pumpReceive
@ -73,7 +73,7 @@ class TwoPartyTradeFlowTests {
@Before @Before
fun before() { fun before() {
setCordappPackages("net.corda.ptflows.contracts") setCordappPackages("com.r3.corda.enterprise.perftestcordapp.contracts")
LogHelper.setLevel("platform.trade", "core.contract.TransactionGroup", "recordingmap") LogHelper.setLevel("platform.trade", "core.contract.TransactionGroup", "recordingmap")
} }