mirror of
https://github.com/corda/corda.git
synced 2025-06-22 00:57:21 +00:00
Add information on who started flow on a node. (#549)
* Add information on who started flow on a node with name where possible. Add sealed class holding information on different ways of starting a flow: RPC, peer, shell, scheduled. * Remove invokeFlowAsync from ServiceHub, move it to ServiceHubInternal. We shouldn't be able to start new state machines from inside flows.
This commit is contained in:
committed by
GitHub
parent
af7f5ef0d7
commit
c1b7b1cb75
@ -3,6 +3,7 @@ package net.corda.testing.node
|
||||
import net.corda.core.contracts.Attachment
|
||||
import net.corda.core.contracts.PartyAndReference
|
||||
import net.corda.core.crypto.*
|
||||
import net.corda.core.flows.FlowInitiator
|
||||
import net.corda.core.flows.FlowLogic
|
||||
import net.corda.core.flows.FlowStateMachine
|
||||
import net.corda.core.flows.StateMachineRunId
|
||||
@ -46,10 +47,6 @@ import javax.annotation.concurrent.ThreadSafe
|
||||
* building chains of transactions and verifying them. It isn't sufficient for testing flows however.
|
||||
*/
|
||||
open class MockServices(val key: KeyPair = generateKeyPair()) : ServiceHub {
|
||||
override fun <T : Any> invokeFlowAsync(logicType: Class<out FlowLogic<T>>, vararg args: Any?): FlowStateMachine<T> {
|
||||
throw UnsupportedOperationException("not implemented")
|
||||
}
|
||||
|
||||
override fun recordTransactions(txs: Iterable<SignedTransaction>) {
|
||||
txs.forEach {
|
||||
storageService.stateMachineRecordedTransactionMapping.addMapping(StateMachineRunId.createRandom(), it.id)
|
||||
|
Reference in New Issue
Block a user