mirror of
https://github.com/corda/corda.git
synced 2025-06-23 01:19:00 +00:00
node: Fix after rebase
This commit is contained in:
@ -6,6 +6,7 @@ import com.r3corda.client.model.ProgressTrackingEvent
|
|||||||
import com.r3corda.core.bufferUntilSubscribed
|
import com.r3corda.core.bufferUntilSubscribed
|
||||||
import com.r3corda.core.contracts.*
|
import com.r3corda.core.contracts.*
|
||||||
import com.r3corda.core.node.NodeInfo
|
import com.r3corda.core.node.NodeInfo
|
||||||
|
import com.r3corda.core.node.services.ServiceInfo
|
||||||
import com.r3corda.core.node.services.StateMachineTransactionMapping
|
import com.r3corda.core.node.services.StateMachineTransactionMapping
|
||||||
import com.r3corda.core.node.services.Vault
|
import com.r3corda.core.node.services.Vault
|
||||||
import com.r3corda.core.protocols.StateMachineRunId
|
import com.r3corda.core.protocols.StateMachineRunId
|
||||||
@ -43,7 +44,7 @@ class NodeMonitorModelTest {
|
|||||||
thread {
|
thread {
|
||||||
driver {
|
driver {
|
||||||
val aliceNodeFuture = startNode("Alice")
|
val aliceNodeFuture = startNode("Alice")
|
||||||
val notaryNodeFuture = startNode("Notary", advertisedServices = setOf(SimpleNotaryService.Type))
|
val notaryNodeFuture = startNode("Notary", advertisedServices = setOf(ServiceInfo(SimpleNotaryService.Type)))
|
||||||
|
|
||||||
aliceNode = aliceNodeFuture.get()
|
aliceNode = aliceNodeFuture.get()
|
||||||
notaryNode = notaryNodeFuture.get()
|
notaryNode = notaryNodeFuture.get()
|
||||||
|
@ -80,7 +80,7 @@ class ServerRPCOps(
|
|||||||
val tx = builder.toSignedTransaction(checkSufficientSignatures = false)
|
val tx = builder.toSignedTransaction(checkSufficientSignatures = false)
|
||||||
val protocol = FinalityProtocol(tx, setOf(req), setOf(req.recipient))
|
val protocol = FinalityProtocol(tx, setOf(req), setOf(req.recipient))
|
||||||
return TransactionBuildResult.ProtocolStarted(
|
return TransactionBuildResult.ProtocolStarted(
|
||||||
smm.add(BroadcastTransactionProtocol.TOPIC, protocol).id,
|
smm.add(BroadcastTransactionProtocol::class.java.simpleName, protocol).id,
|
||||||
tx,
|
tx,
|
||||||
"Cash payment transaction generated"
|
"Cash payment transaction generated"
|
||||||
)
|
)
|
||||||
@ -114,7 +114,7 @@ class ServerRPCOps(
|
|||||||
val tx = builder.toSignedTransaction(checkSufficientSignatures = false)
|
val tx = builder.toSignedTransaction(checkSufficientSignatures = false)
|
||||||
val protocol = FinalityProtocol(tx, setOf(req), participants)
|
val protocol = FinalityProtocol(tx, setOf(req), participants)
|
||||||
return TransactionBuildResult.ProtocolStarted(
|
return TransactionBuildResult.ProtocolStarted(
|
||||||
smm.add(BroadcastTransactionProtocol.TOPIC, protocol).id,
|
smm.add(BroadcastTransactionProtocol::class.java.simpleName, protocol).id,
|
||||||
tx,
|
tx,
|
||||||
"Cash destruction transaction generated"
|
"Cash destruction transaction generated"
|
||||||
)
|
)
|
||||||
@ -133,7 +133,7 @@ class ServerRPCOps(
|
|||||||
// Issuance transactions do not need to be notarised, so we can skip directly to broadcasting it
|
// Issuance transactions do not need to be notarised, so we can skip directly to broadcasting it
|
||||||
val protocol = BroadcastTransactionProtocol(tx, setOf(req), setOf(req.recipient))
|
val protocol = BroadcastTransactionProtocol(tx, setOf(req), setOf(req.recipient))
|
||||||
return TransactionBuildResult.ProtocolStarted(
|
return TransactionBuildResult.ProtocolStarted(
|
||||||
smm.add(BroadcastTransactionProtocol.TOPIC, protocol).id,
|
smm.add(BroadcastTransactionProtocol::class.java.simpleName, protocol).id,
|
||||||
tx,
|
tx,
|
||||||
"Cash issuance completed"
|
"Cash issuance completed"
|
||||||
)
|
)
|
||||||
|
@ -2,6 +2,7 @@ package com.r3corda.node
|
|||||||
|
|
||||||
import com.r3corda.contracts.asset.Cash
|
import com.r3corda.contracts.asset.Cash
|
||||||
import com.r3corda.core.contracts.*
|
import com.r3corda.core.contracts.*
|
||||||
|
import com.r3corda.core.node.services.ServiceInfo
|
||||||
import com.r3corda.core.node.services.Vault
|
import com.r3corda.core.node.services.Vault
|
||||||
import com.r3corda.core.protocols.StateMachineRunId
|
import com.r3corda.core.protocols.StateMachineRunId
|
||||||
import com.r3corda.core.serialization.OpaqueBytes
|
import com.r3corda.core.serialization.OpaqueBytes
|
||||||
@ -10,7 +11,7 @@ import com.r3corda.core.utilities.DUMMY_NOTARY
|
|||||||
import com.r3corda.node.internal.ServerRPCOps
|
import com.r3corda.node.internal.ServerRPCOps
|
||||||
import com.r3corda.node.services.messaging.StateMachineUpdate
|
import com.r3corda.node.services.messaging.StateMachineUpdate
|
||||||
import com.r3corda.node.services.network.NetworkMapService
|
import com.r3corda.node.services.network.NetworkMapService
|
||||||
import com.r3corda.node.services.transactions.ValidatingNotaryService
|
import com.r3corda.node.services.transactions.SimpleNotaryService
|
||||||
import com.r3corda.testing.expect
|
import com.r3corda.testing.expect
|
||||||
import com.r3corda.testing.expectEvents
|
import com.r3corda.testing.expectEvents
|
||||||
import com.r3corda.testing.node.MockNetwork
|
import com.r3corda.testing.node.MockNetwork
|
||||||
@ -37,9 +38,9 @@ class ServerRPCTest {
|
|||||||
@Before
|
@Before
|
||||||
fun setup() {
|
fun setup() {
|
||||||
network = MockNetwork()
|
network = MockNetwork()
|
||||||
val networkMap = network.createNode(advertisedServices = NetworkMapService.Type)
|
val networkMap = network.createNode(advertisedServices = ServiceInfo(NetworkMapService.Type))
|
||||||
aliceNode = network.createNode(networkMapAddress = networkMap.info.address)
|
aliceNode = network.createNode(networkMapAddress = networkMap.info.address)
|
||||||
notaryNode = network.createNode(advertisedServices = ValidatingNotaryService.Type, networkMapAddress = networkMap.info.address)
|
notaryNode = network.createNode(advertisedServices = ServiceInfo(SimpleNotaryService.Type), networkMapAddress = networkMap.info.address)
|
||||||
rpc = ServerRPCOps(aliceNode.services, aliceNode.smm, aliceNode.database)
|
rpc = ServerRPCOps(aliceNode.services, aliceNode.smm, aliceNode.database)
|
||||||
|
|
||||||
stateMachineUpdates = rpc.stateMachinesAndUpdates().second
|
stateMachineUpdates = rpc.stateMachinesAndUpdates().second
|
||||||
|
Reference in New Issue
Block a user