diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/PtCurrencies.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/PtCurrencies.kt similarity index 97% rename from perftestflows/src/main/kotlin/net/corda/ptflows/PtCurrencies.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/PtCurrencies.kt index c957b5ce16..ffef67399c 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/PtCurrencies.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/PtCurrencies.kt @@ -1,6 +1,6 @@ @file:JvmName("PtCurrencies") -package net.corda.ptflows +package com.r3.corda.enterprise.perftestcordapp import net.corda.core.contracts.Amount import net.corda.core.contracts.Issued diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/contracts/PtCommercialPaper.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/PtCommercialPaper.kt similarity index 95% rename from perftestflows/src/main/kotlin/net/corda/ptflows/contracts/PtCommercialPaper.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/PtCommercialPaper.kt index cbc5693735..aba7079ba6 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/contracts/PtCommercialPaper.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/PtCommercialPaper.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.contracts +package com.r3.corda.enterprise.perftestcordapp.contracts 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.transactions.LedgerTransaction import net.corda.core.transactions.TransactionBuilder -import net.corda.ptflows.contracts.asset.PtCash -import net.corda.ptflows.schemas.PtCommercialPaperSchemaV1 -import net.corda.ptflows.utils.sumCashBy +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash +import com.r3.corda.enterprise.perftestcordapp.schemas.PtCommercialPaperSchemaV1 +import com.r3.corda.enterprise.perftestcordapp.utils.sumCashBy import java.time.Instant import java.util.* @@ -43,12 +43,12 @@ import java.util.* * 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. class PtCommercialPaper : Contract { 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( val issuance: PartyAndReference, diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/PtCash.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtCash.kt similarity index 97% rename from perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/PtCash.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtCash.kt index 45a5e3adc4..715c454958 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/PtCash.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtCash.kt @@ -1,5 +1,5 @@ // 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 net.corda.core.contracts.* @@ -19,10 +19,10 @@ import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.TransactionBuilder import net.corda.core.utilities.OpaqueBytes import net.corda.core.utilities.toBase58String -import net.corda.ptflows.schemas.PtCashSchemaV1 -import net.corda.ptflows.utils.sumCash -import net.corda.ptflows.utils.sumCashOrNull -import net.corda.ptflows.utils.sumCashOrZero +import com.r3.corda.enterprise.perftestcordapp.schemas.PtCashSchemaV1 +import com.r3.corda.enterprise.perftestcordapp.utils.sumCash +import com.r3.corda.enterprise.perftestcordapp.utils.sumCashOrNull +import com.r3.corda.enterprise.perftestcordapp.utils.sumCashOrZero import java.math.BigInteger import java.security.PublicKey import java.sql.DatabaseMetaData @@ -53,7 +53,7 @@ interface PtCashSelection { instance.set(cashSelectionAlgo) cashSelectionAlgo } ?: 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() } } @@ -261,7 +261,7 @@ class PtCash : PtOnLedgerAsset() { } 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 diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/PtOnLedgerAsset.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtOnLedgerAsset.kt similarity index 99% rename from perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/PtOnLedgerAsset.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtOnLedgerAsset.kt index ac0365ff3a..374ce000aa 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/PtOnLedgerAsset.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtOnLedgerAsset.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.contracts.asset +package com.r3.corda.enterprise.perftestcordapp.contracts.asset import net.corda.core.contracts.* diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/cash/selection/PtCashSelectionH2Impl.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/cash/selection/PtCashSelectionH2Impl.kt similarity index 97% rename from perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/cash/selection/PtCashSelectionH2Impl.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/cash/selection/PtCashSelectionH2Impl.kt index fbc8993b26..36e12f7a87 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/contracts/asset/cash/selection/PtCashSelectionH2Impl.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/cash/selection/PtCashSelectionH2Impl.kt @@ -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.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.StateAndRef 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.deserialize 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.SQLException import java.util.* diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/AbstractPtCashFlow.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/AbstractPtCashFlow.kt similarity index 96% rename from perftestflows/src/main/kotlin/net/corda/ptflows/flows/AbstractPtCashFlow.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/AbstractPtCashFlow.kt index 31e256f721..09c2af2dad 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/AbstractPtCashFlow.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/AbstractPtCashFlow.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.flows +package com.r3.corda.enterprise.perftestcordapp.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.Amount diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashConfigDataFlow.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashConfigDataFlow.kt similarity index 82% rename from perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashConfigDataFlow.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashConfigDataFlow.kt index a235ff6a51..14dc78df3c 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashConfigDataFlow.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashConfigDataFlow.kt @@ -1,14 +1,14 @@ -package net.corda.ptflows.flows +package com.r3.corda.enterprise.perftestcordapp.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic import net.corda.core.flows.StartableByRPC import net.corda.core.serialization.CordaSerializable -import net.corda.ptflows.CHF -import net.corda.ptflows.EUR -import net.corda.ptflows.GBP -import net.corda.ptflows.USD +import com.r3.corda.enterprise.perftestcordapp.CHF +import com.r3.corda.enterprise.perftestcordapp.EUR +import com.r3.corda.enterprise.perftestcordapp.GBP +import com.r3.corda.enterprise.perftestcordapp.USD import java.util.* /** diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashExitFlow.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashExitFlow.kt similarity index 93% rename from perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashExitFlow.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashExitFlow.kt index 2aa360137f..a4384ceabe 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashExitFlow.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashExitFlow.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.flows +package com.r3.corda.enterprise.perftestcordapp.flows import co.paralleluniverse.fibers.Suspendable 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.utilities.OpaqueBytes import net.corda.core.utilities.ProgressTracker -import net.corda.ptflows.contracts.asset.PtCash -import net.corda.ptflows.contracts.asset.PtCashSelection -import net.corda.ptflows.issuedBy +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCashSelection +import com.r3.corda.enterprise.perftestcordapp.issuedBy import java.util.* /** diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashIssueAndPaymentFlow.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashIssueAndPaymentFlow.kt similarity index 97% rename from perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashIssueAndPaymentFlow.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashIssueAndPaymentFlow.kt index 74cca5b215..bbcdc54e30 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashIssueAndPaymentFlow.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashIssueAndPaymentFlow.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.flows +package com.r3.corda.enterprise.perftestcordapp.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.Amount diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashIssueFlow.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashIssueFlow.kt similarity index 93% rename from perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashIssueFlow.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashIssueFlow.kt index e249f5090e..ae63863c69 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashIssueFlow.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashIssueFlow.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.flows +package com.r3.corda.enterprise.perftestcordapp.flows import co.paralleluniverse.fibers.Suspendable 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.utilities.OpaqueBytes import net.corda.core.utilities.ProgressTracker -import net.corda.ptflows.contracts.asset.PtCash -import net.corda.ptflows.issuedBy +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash +import com.r3.corda.enterprise.perftestcordapp.issuedBy import java.util.* /** diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashPaymentFlow.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashPaymentFlow.kt similarity index 96% rename from perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashPaymentFlow.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashPaymentFlow.kt index bb92fea5ce..1a29582f69 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/PtCashPaymentFlow.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/PtCashPaymentFlow.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.flows +package com.r3.corda.enterprise.perftestcordapp.flows import co.paralleluniverse.fibers.Suspendable 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.transactions.TransactionBuilder 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.* /** diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/TwoPartyTradeFlow.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/TwoPartyTradeFlow.kt similarity index 98% rename from perftestflows/src/main/kotlin/net/corda/ptflows/flows/TwoPartyTradeFlow.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/TwoPartyTradeFlow.kt index 0f40dda661..54d0a0e7f4 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/flows/TwoPartyTradeFlow.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/flows/TwoPartyTradeFlow.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.flows +package com.r3.corda.enterprise.perftestcordapp.flows import co.paralleluniverse.fibers.Suspendable 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.seconds import net.corda.core.utilities.unwrap -import net.corda.ptflows.contracts.asset.PtCash -import net.corda.ptflows.utils.sumCashBy +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash +import com.r3.corda.enterprise.perftestcordapp.utils.sumCashBy import java.security.PublicKey import java.util.* diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/schemas/PtCashSchemaV1.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/schemas/PtCashSchemaV1.kt similarity index 96% rename from perftestflows/src/main/kotlin/net/corda/ptflows/schemas/PtCashSchemaV1.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/schemas/PtCashSchemaV1.kt index ca43d2f748..8adbc28a28 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/schemas/PtCashSchemaV1.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/schemas/PtCashSchemaV1.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.schemas +package com.r3.corda.enterprise.perftestcordapp.schemas import net.corda.core.identity.AbstractParty diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/schemas/PtCommercialPaperSchemaV1.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/schemas/PtCommercialPaperSchemaV1.kt similarity index 97% rename from perftestflows/src/main/kotlin/net/corda/ptflows/schemas/PtCommercialPaperSchemaV1.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/schemas/PtCommercialPaperSchemaV1.kt index 54c12d99e1..9609eb0560 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/schemas/PtCommercialPaperSchemaV1.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/schemas/PtCommercialPaperSchemaV1.kt @@ -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.PersistentState import net.corda.core.serialization.CordaSerializable diff --git a/perftestflows/src/main/kotlin/net/corda/ptflows/utils/StateSummingUtilities.kt b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/utils/StateSummingUtilities.kt similarity index 77% rename from perftestflows/src/main/kotlin/net/corda/ptflows/utils/StateSummingUtilities.kt rename to perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/utils/StateSummingUtilities.kt index 66ed583626..2a70515997 100644 --- a/perftestflows/src/main/kotlin/net/corda/ptflows/utils/StateSummingUtilities.kt +++ b/perftestflows/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/utils/StateSummingUtilities.kt @@ -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.Companion.sumOrNull 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 * different currencies or issuers). */ -fun Iterable.sumCashBy(owner: AbstractParty): Amount> = filterIsInstance().filter { it.owner == owner }.map { it.amount }.sumOrThrow() +fun Iterable.sumCashBy(owner: AbstractParty): Amount> = filterIsInstance().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 * states cannot be added together (i.e. are different currencies or issuers). */ -fun Iterable.sumCash(): Amount> = filterIsInstance().map { it.amount }.sumOrThrow() +fun Iterable.sumCash(): Amount> = filterIsInstance().map { it.amount }.sumOrThrow() /** Sums the cash states in the list, returning null if there are none. */ -fun Iterable.sumCashOrNull(): Amount>? = filterIsInstance().map { it.amount }.sumOrNull() +fun Iterable.sumCashOrNull(): Amount>? = filterIsInstance().map { it.amount }.sumOrNull() /** Sums the cash states in the list, returning zero of the given currency+issuer if there are none. */ fun Iterable.sumCashOrZero(currency: Issued): Amount> { - return filterIsInstance().map { it.amount }.sumOrZero(currency) + return filterIsInstance().map { it.amount }.sumOrZero(currency) } /** Sums the asset states in the list, returning null if there are none. */ diff --git a/perftestflows/src/main/resources/META-INF/services/com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCashSelection b/perftestflows/src/main/resources/META-INF/services/com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCashSelection new file mode 100644 index 0000000000..4785dc0294 --- /dev/null +++ b/perftestflows/src/main/resources/META-INF/services/com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCashSelection @@ -0,0 +1,2 @@ +com.r3.corda.enterprise.perftestcordapp.contracts.asset.cash.selection.PtCashSelectionH2Impl + diff --git a/perftestflows/src/main/resources/META-INF/services/net.corda.ptflows.contracts.asset.PtCashSelection b/perftestflows/src/main/resources/META-INF/services/net.corda.ptflows.contracts.asset.PtCashSelection deleted file mode 100644 index c60a063a74..0000000000 --- a/perftestflows/src/main/resources/META-INF/services/net.corda.ptflows.contracts.asset.PtCashSelection +++ /dev/null @@ -1,2 +0,0 @@ -net.corda.ptflows.contracts.asset.cash.selection.PtCashSelectionH2Impl - diff --git a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/PtCommercialPaperTests.kt b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/PtCommercialPaperTests.kt similarity index 97% rename from perftestflows/src/test/kotlin/net/corda/ptflows/contracts/PtCommercialPaperTests.kt rename to perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/PtCommercialPaperTests.kt index decb9cb494..38c038e9ec 100644 --- a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/PtCommercialPaperTests.kt +++ b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/PtCommercialPaperTests.kt @@ -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.identity.AnonymousParty @@ -9,11 +9,11 @@ import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.TransactionBuilder import net.corda.core.utilities.days import net.corda.core.utilities.seconds -import net.corda.ptflows.DOLLARS -import net.corda.ptflows.`issued by` -import net.corda.ptflows.contracts.asset.* +import com.r3.corda.enterprise.perftestcordapp.DOLLARS +import com.r3.corda.enterprise.perftestcordapp.`issued by` +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.* 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 org.junit.Ignore import org.junit.Test diff --git a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/asset/PtCashTests.kt b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtCashTests.kt similarity index 97% rename from perftestflows/src/test/kotlin/net/corda/ptflows/contracts/asset/PtCashTests.kt rename to perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtCashTests.kt index 52e7a3fa3e..20aa08907b 100644 --- a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/asset/PtCashTests.kt +++ b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/PtCashTests.kt @@ -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.crypto.SecureHash 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.WireTransaction 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.utilities.CordaPersistence import net.corda.testing.* @@ -103,8 +103,8 @@ class PtCashTests : TestDependencyInjectionBase() { @Before fun setUp() { LogHelper.setLevel(NodeVaultService::class) - megaCorpServices = MockServices(listOf("net.corda.ptflows.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)) + megaCorpServices = MockServices(listOf("com.r3.corda.enterprise.perftestcordapp.contracts.asset"), MEGA_CORP_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 miniCorpServices = databaseAndServices.second @@ -145,7 +145,7 @@ class PtCashTests : TestDependencyInjectionBase() { output(PtCash.PROGRAM_ID) { outState } command(ALICE_PUBKEY) { DummyCommandData } // 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 { output(PtCash.PROGRAM_ID) { outState } @@ -429,7 +429,7 @@ class PtCashTests : TestDependencyInjectionBase() { tweak { 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 { command(MEGA_CORP_PUBKEY) { PtCash.Commands.Move() } diff --git a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashExitFlowTests.kt b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashExitFlowTests.kt similarity index 82% rename from perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashExitFlowTests.kt rename to perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashExitFlowTests.kt index 69986b6f44..e65c743615 100644 --- a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashExitFlowTests.kt +++ b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashExitFlowTests.kt @@ -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.utilities.OpaqueBytes import net.corda.core.utilities.getOrThrow -import net.corda.ptflows.flows.PtCashException -import net.corda.ptflows.flows.PtCashExitFlow -import net.corda.ptflows.flows.PtCashIssueFlow -import net.corda.ptflows.DOLLARS -import net.corda.ptflows.`issued by` -import net.corda.ptflows.contracts.asset.PtCash +import com.r3.corda.enterprise.perftestcordapp.flows.PtCashException +import com.r3.corda.enterprise.perftestcordapp.flows.PtCashExitFlow +import com.r3.corda.enterprise.perftestcordapp.flows.PtCashIssueFlow +import com.r3.corda.enterprise.perftestcordapp.DOLLARS +import com.r3.corda.enterprise.perftestcordapp.`issued by` +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash import net.corda.node.internal.StartedNode import net.corda.testing.chooseIdentity import net.corda.testing.getDefaultNotary @@ -34,7 +34,7 @@ class CashExitFlowTests { @Before fun start() { - setCordappPackages("net.corda.ptflows.contracts.asset") + setCordappPackages("com.r3.corda.enterprise.perftestcordapp.contracts.asset") mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin()) val nodes = mockNet.createSomeNodes(1) notaryNode = nodes.notaryNode diff --git a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashIssueFlowTests.kt b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashIssueFlowTests.kt similarity index 84% rename from perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashIssueFlowTests.kt rename to perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashIssueFlowTests.kt index 318b1cc53b..d355d264ff 100644 --- a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashIssueFlowTests.kt +++ b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashIssueFlowTests.kt @@ -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.utilities.OpaqueBytes import net.corda.core.utilities.getOrThrow -import net.corda.ptflows.DOLLARS -import net.corda.ptflows.`issued by` -import net.corda.ptflows.contracts.asset.PtCash +import com.r3.corda.enterprise.perftestcordapp.DOLLARS +import com.r3.corda.enterprise.perftestcordapp.`issued by` +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash 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.getDefaultNotary import net.corda.testing.node.InMemoryMessagingNetwork.ServicePeerAllocationStrategy.RoundRobin @@ -29,7 +29,7 @@ class CashIssueFlowTests { @Before fun start() { - setCordappPackages("net.corda.ptflows.contracts.asset") + setCordappPackages("com.r3.corda.enterprise.perftestcordapp.contracts.asset") mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin()) val nodes = mockNet.createSomeNodes(1) notaryNode = nodes.notaryNode diff --git a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashPaymentFlowTests.kt b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashPaymentFlowTests.kt similarity index 89% rename from perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashPaymentFlowTests.kt rename to perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashPaymentFlowTests.kt index 7a2ee8eaf0..5c1372d02c 100644 --- a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/CashPaymentFlowTests.kt +++ b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/CashPaymentFlowTests.kt @@ -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.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.utilities.OpaqueBytes import net.corda.core.utilities.getOrThrow -import net.corda.ptflows.DOLLARS -import net.corda.ptflows.`issued by` -import net.corda.ptflows.contracts.asset.PtCash -import net.corda.ptflows.flows.PtCashException -import net.corda.ptflows.flows.PtCashIssueFlow -import net.corda.ptflows.flows.PtCashPaymentFlow +import com.r3.corda.enterprise.perftestcordapp.DOLLARS +import com.r3.corda.enterprise.perftestcordapp.`issued by` +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash +import com.r3.corda.enterprise.perftestcordapp.flows.PtCashException +import com.r3.corda.enterprise.perftestcordapp.flows.PtCashIssueFlow +import com.r3.corda.enterprise.perftestcordapp.flows.PtCashPaymentFlow import net.corda.node.internal.StartedNode import net.corda.testing.chooseIdentity import net.corda.testing.expect @@ -38,7 +38,7 @@ class CashPaymentFlowTests { @Before fun start() { - setCordappPackages("net.corda.ptflows.contracts.asset") + setCordappPackages("com.r3.corda.enterprise.perftestcordapp.contracts.asset") mockNet = MockNetwork(servicePeerAllocationStrategy = RoundRobin()) val nodes = mockNet.createSomeNodes(1) notaryNode = nodes.notaryNode diff --git a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/TwoPartyTradeFlowTest.kt b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/TwoPartyTradeFlowTest.kt similarity index 97% rename from perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/TwoPartyTradeFlowTest.kt rename to perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/TwoPartyTradeFlowTest.kt index 81f7299dfe..c560f8d576 100644 --- a/perftestflows/src/test/kotlin/net/corda/ptflows/contracts/flows/TwoPartyTradeFlowTest.kt +++ b/perftestflows/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/flows/TwoPartyTradeFlowTest.kt @@ -1,4 +1,4 @@ -package net.corda.ptflows.contracts.flows +package com.r3.corda.enterprise.perftestcordapp.contracts.flows import co.paralleluniverse.fibers.Suspendable 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.toNonEmptySet import net.corda.core.utilities.unwrap -import net.corda.ptflows.DOLLARS -import net.corda.ptflows.`issued by` -import net.corda.ptflows.contracts.PtCommercialPaper -import net.corda.ptflows.contracts.asset.CASH -import net.corda.ptflows.contracts.asset.PtCash -import net.corda.ptflows.contracts.asset.`issued by` -import net.corda.ptflows.contracts.asset.`owned by` -import net.corda.ptflows.flows.TwoPartyTradeFlow.Buyer -import net.corda.ptflows.flows.TwoPartyTradeFlow.Seller +import com.r3.corda.enterprise.perftestcordapp.DOLLARS +import com.r3.corda.enterprise.perftestcordapp.`issued by` +import com.r3.corda.enterprise.perftestcordapp.contracts.PtCommercialPaper +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.CASH +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.PtCash +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.`issued by` +import com.r3.corda.enterprise.perftestcordapp.contracts.asset.`owned by` +import com.r3.corda.enterprise.perftestcordapp.flows.TwoPartyTradeFlow.Buyer +import com.r3.corda.enterprise.perftestcordapp.flows.TwoPartyTradeFlow.Seller import net.corda.node.internal.StartedNode import net.corda.node.services.api.WritableTransactionStorage 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.nodeapi.internal.ServiceInfo 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.MockNetwork import net.corda.testing.node.pumpReceive @@ -73,7 +73,7 @@ class TwoPartyTradeFlowTests { @Before fun before() { - setCordappPackages("net.corda.ptflows.contracts") + setCordappPackages("com.r3.corda.enterprise.perftestcordapp.contracts") LogHelper.setLevel("platform.trade", "core.contract.TransactionGroup", "recordingmap") }