mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
Rename the package to com.r3.corda.enterprise.perftestcordapp
This commit is contained in:
parent
1241c79d7c
commit
d0a7ce3a4e
@ -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
|
@ -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,
|
@ -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<Currency, PtCash.Commands, PtCash.State>() {
|
||||
}
|
||||
|
||||
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
|
@ -1,4 +1,4 @@
|
||||
package net.corda.ptflows.contracts.asset
|
||||
package com.r3.corda.enterprise.perftestcordapp.contracts.asset
|
||||
|
||||
|
||||
import net.corda.core.contracts.*
|
@ -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.*
|
@ -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
|
@ -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.*
|
||||
|
||||
/**
|
@ -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.*
|
||||
|
||||
/**
|
@ -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
|
@ -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.*
|
||||
|
||||
/**
|
@ -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.*
|
||||
|
||||
/**
|
@ -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.*
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.corda.ptflows.schemas
|
||||
package com.r3.corda.enterprise.perftestcordapp.schemas
|
||||
|
||||
|
||||
import net.corda.core.identity.AbstractParty
|
@ -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
|
@ -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<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
|
||||
* 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. */
|
||||
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. */
|
||||
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. */
|
@ -0,0 +1,2 @@
|
||||
com.r3.corda.enterprise.perftestcordapp.contracts.asset.cash.selection.PtCashSelectionH2Impl
|
||||
|
@ -1,2 +0,0 @@
|
||||
net.corda.ptflows.contracts.asset.cash.selection.PtCashSelectionH2Impl
|
||||
|
@ -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
|
@ -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() }
|
@ -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
|
@ -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
|
@ -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
|
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user