mirror of
https://github.com/corda/corda.git
synced 2025-06-23 01:19:00 +00:00
Merge remote-tracking branch 'open-hc02/master' into colljos-os-hc02-merge-121217
This commit is contained in:
@ -8,6 +8,8 @@ import net.corda.nodeapi.internal.config.User
|
||||
import net.corda.testing.DUMMY_BANK_A
|
||||
import net.corda.testing.DUMMY_BANK_B
|
||||
import net.corda.testing.*
|
||||
import net.corda.testing.DUMMY_BANK_A_NAME
|
||||
import net.corda.testing.DUMMY_BANK_B_NAME
|
||||
import net.corda.testing.driver.PortAllocation
|
||||
import net.corda.testing.driver.driver
|
||||
import org.junit.ClassRule
|
||||
@ -36,8 +38,8 @@ class AttachmentDemoTest : IntegrationTest() {
|
||||
invokeRpc(CordaRPCOps::internalVerifiedTransactionsFeed)
|
||||
)))
|
||||
val (nodeA, nodeB) = listOf(
|
||||
startNode(providedName = DUMMY_BANK_A.name, rpcUsers = demoUser, maximumHeapSize = "1g"),
|
||||
startNode(providedName = DUMMY_BANK_B.name, rpcUsers = demoUser, maximumHeapSize = "1g")
|
||||
startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = demoUser, maximumHeapSize = "1g"),
|
||||
startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = demoUser, maximumHeapSize = "1g")
|
||||
).map { it.getOrThrow() }
|
||||
startWebserver(nodeB).getOrThrow()
|
||||
|
||||
|
@ -23,9 +23,9 @@ import net.corda.core.transactions.TransactionBuilder
|
||||
import net.corda.core.utilities.NetworkHostAndPort
|
||||
import net.corda.core.utilities.ProgressTracker
|
||||
import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.testing.DUMMY_BANK_B
|
||||
import net.corda.testing.DUMMY_NOTARY
|
||||
import net.corda.testing.internal.poll
|
||||
import net.corda.testing.node.internal.poll
|
||||
import net.corda.testing.DUMMY_BANK_B_NAME
|
||||
import net.corda.testing.DUMMY_NOTARY_NAME
|
||||
import java.io.InputStream
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
@ -88,9 +88,8 @@ fun sender(rpc: CordaRPCOps, numOfClearBytes: Int = 1024) { // default size 1K.
|
||||
private fun sender(rpc: CordaRPCOps, inputStream: InputStream, hash: SecureHash.SHA256, executor: ScheduledExecutorService) {
|
||||
|
||||
// Get the identity key of the other side (the recipient).
|
||||
val notaryFuture: CordaFuture<Party> = poll(executor, DUMMY_NOTARY.name.toString()) { rpc.wellKnownPartyFromX500Name(DUMMY_NOTARY.name) }
|
||||
val otherSideFuture: CordaFuture<Party> = poll(executor, DUMMY_BANK_B.name.toString()) { rpc.wellKnownPartyFromX500Name(DUMMY_BANK_B.name) }
|
||||
|
||||
val notaryFuture: CordaFuture<Party> = poll(executor, DUMMY_NOTARY_NAME.toString()) { rpc.wellKnownPartyFromX500Name(DUMMY_NOTARY_NAME) }
|
||||
val otherSideFuture: CordaFuture<Party> = poll(executor, DUMMY_BANK_B_NAME.toString()) { rpc.wellKnownPartyFromX500Name(DUMMY_BANK_B_NAME) }
|
||||
// Make sure we have the file in storage
|
||||
if (!rpc.attachmentExists(hash)) {
|
||||
inputStream.use {
|
||||
|
@ -2,8 +2,8 @@ package net.corda.attachmentdemo
|
||||
|
||||
import net.corda.core.internal.div
|
||||
import net.corda.nodeapi.internal.config.User
|
||||
import net.corda.testing.DUMMY_BANK_A
|
||||
import net.corda.testing.DUMMY_BANK_B
|
||||
import net.corda.testing.DUMMY_BANK_A_NAME
|
||||
import net.corda.testing.DUMMY_BANK_B_NAME
|
||||
import net.corda.testing.driver.driver
|
||||
|
||||
/**
|
||||
@ -13,7 +13,7 @@ import net.corda.testing.driver.driver
|
||||
fun main(args: Array<String>) {
|
||||
val demoUser = listOf(User("demo", "demo", setOf("StartFlow.net.corda.flows.FinalityFlow")))
|
||||
driver(isDebug = true, driverDirectory = "build" / "attachment-demo-nodes", waitForAllNodesToFinish = true) {
|
||||
startNode(providedName = DUMMY_BANK_A.name, rpcUsers = demoUser)
|
||||
startNode(providedName = DUMMY_BANK_B.name, rpcUsers = demoUser)
|
||||
startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = demoUser)
|
||||
startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = demoUser)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user