corda

Getting Exception while fetching data from database in the flow

为君一笑 提交于 2019-12-23 05:27:18
问题 I am getting the error below: Step 1: serviceHub.jdbcSession().prepareStatement("Query") Step 2: I have executed the step1. Step 3: I am getting the data I needed. but also I am getting the below exception also. com.esotericsoftware.kryo.KryoException: java.lang.UnsupportedOperationException: com.zaxxer.hikari.pool.HikariProxyPreparedStatement, which is a closeable resource, has been detected during flow checkpointing. Restoring such resources across node restarts is not supported. Make sure

Initiating a flow session from a flow that is annoted with InitiatedBy to a flow which is also InitiatedBy

回眸只為那壹抹淺笑 提交于 2019-12-23 05:17:05
问题 Is it possible to initiate a flow session from a flow that is annoted with InitiatedBy to a flow which is also annoted with InitiatedBy? For example: @InitiatingFlow Class FlowA @InitiatedBy(FlowA.class) Class FlowB @InitiatedBy(FlowB.class) Class FlowC is it possible to achieve sequence of flow session like: A->B->C ? 回答1: Yes, this is possible, as follows: @InitiatingFlow @StartableByRPC class Initiator(val firstCounterparty: Party, val secondCounterparty: Party) : FlowLogic<Int>() {

In the Corda flow testing framework, how can I get an RPC connection to a mock node?

喜夏-厌秋 提交于 2019-12-23 05:12:02
问题 When creating a mock network for testing flows in Corda, how can I get an RPC connection to one of the mock nodes? 回答1: The mock nodes do not expose an API for getting an RPC connection. If you need to run tests that involve a node's RPC connection, you should start the nodes via the node driver: fun main(args: Array<String>) { val user = User("user1", "test", permissions = setOf("ALL")) driver(DriverParameters(startNodesInProcess = true, waitForAllNodesToFinish = true)) { val partyA =

Corda with mockito_kotlin for unit test

百般思念 提交于 2019-12-23 05:07:06
问题 Hi I am trying to mock a Offchain/ API hit that is querying a offchain database / sepaarate external system. however i am facing problems when using mockito_kotlin to mock the response from the functions, it seems like the portion was not taken up during the starting of different nodes. Is there any example or ways to perform this? Edited: I have a function callExternalService() which will return a string from offLedger service class ExternalService { fun callExternalService() : String { //

Corda: Create and consume same state in one flow?

≡放荡痞女 提交于 2019-12-23 03:07:58
问题 is it possible to create and consume the same corda state in one flow or create and consume it in different subflows? I get the following error: Caused by: net.corda.core.flows.NotaryException: Unable to notarise transactionBEDE8C3F8F2D7A646A9F7D1948DAF77CDAFC37F3B086E09FC766F0D412F02690: One or more input states have been used in another transaction 回答1: Yes, you can create and consume the same Corda state in a single flow. You need to proceed in two steps: Create a first transaction issuing

Corda RSA issue using createKeystoreForCordaNode

余生颓废 提交于 2019-12-23 02:48:07
问题 I am getting the following exception when I use the Corda createKeystoreForCordaNode function. I did create a JKS RSA 2048 root and intermediate CA Keystore by KeyStore Explorer 5.3.1 or keytool command. I also set the DEFAULT_TLS_SIGNATURE_SCHEME to RSA_SHA256. Exception in thread "main" org.bouncycastle.cert.CertException: unable to process signature: exception on setup: java.security.NoSuchAlgorithmException: 1.2.840.113549.1.1.1 Signature not available at org.bouncycastle.cert

Is there a way to add more information to a node, except the mandatory ones?

感情迁移 提交于 2019-12-22 12:39:32
问题 I want to add more node information to a network node. Is it possible to share more data besides what's in the node configuration file? Maybe some custom fields, like an encoded logo image or stuff like that. Thanks 回答1: Yes you can. Inside your module under src folder add a file called config.conf . Add your values inside of it in the following format: key1="string_value" key2=number_value Inside build.gradle go to the part where you define your nodes, let's say your module name is "my

Is there a way to add more information to a node, except the mandatory ones?

不问归期 提交于 2019-12-22 12:39:21
问题 I want to add more node information to a network node. Is it possible to share more data besides what's in the node configuration file? Maybe some custom fields, like an encoded logo image or stuff like that. Thanks 回答1: Yes you can. Inside your module under src folder add a file called config.conf . Add your values inside of it in the following format: key1="string_value" key2=number_value Inside build.gradle go to the part where you define your nodes, let's say your module name is "my

What sequence of steps does a Corda node perform when it starts up and joins a network for the first time?

女生的网名这么多〃 提交于 2019-12-20 15:38:10
问题 What is the sequence of steps that a Corda node performs when it starts up for the first time? 回答1: As of Corda 3, upon first starting up, the node goes through four steps: 1. Obtains the network root certificate out-of-band and stores it in the node's folder under certificates/network-root-truststore.jks This location can be overidden using the --network-root-truststore flag If using a doorman, this root certificate will be used to validate the certificates they provide to prevent man-in-the

What sequence of steps does a Corda node perform when it starts up and joins a network for the first time?

為{幸葍}努か 提交于 2019-12-20 15:37:07
问题 What is the sequence of steps that a Corda node performs when it starts up for the first time? 回答1: As of Corda 3, upon first starting up, the node goes through four steps: 1. Obtains the network root certificate out-of-band and stores it in the node's folder under certificates/network-root-truststore.jks This location can be overidden using the --network-root-truststore flag If using a doorman, this root certificate will be used to validate the certificates they provide to prevent man-in-the