Я написал следующий поток для облегчения транзакции между двумя сторонами - issuer
и subscriber
. Я получаю эту ошибку на этапе Gathering the counterparty's signature.
:
java.lang.IllegalArgumentException: The Initiator of CollectSignaturesFlow must have signed the transaction.
Stacktrace:
java.lang.IllegalArgumentException: The Initiator of CollectSignaturesFlow must have signed the transaction.
at net.corda.core.flows.CollectSignaturesFlow.call(CollectSignaturesFlow.kt:89) ~[corda-core-3.3-corda.jar:?]
at net.corda.core.flows.CollectSignaturesFlow.call(CollectSignaturesFlow.kt:64) ~[corda-core-3.3-corda.jar:?]
at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:290) ~[corda-core-3.3-corda.jar:?]
at com.sample.flow.sampleFlow$Initiator.call(sampleFlow.kt:106) ~[main/:?]
at com.sample.flow.sampleFlow$Initiator.call(sampleFlow.kt:30) ~[main/:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96) [corda-node-3.3-corda.jar:?]
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:44) [corda-node-3.3-corda.jar:?]
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) [quasar-core-0.7.9-jdk8.jar:0.7.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:62) [corda-node-3.3-corda.jar:?]
Мой код: flow.kt
progressTracker.currentStep = GATHERING_SIGS
val participantsParties = sampleState.participants.map { serviceHub.identityService.wellKnownPartyFromAnonymous(it)!! }
val flowSessions = (participantsParties - serviceHub.myInfo.legalIdentities.get(0)).map { initiateFlow(it) }.toSet()
val fullySignedTx = subFlow(CollectSignaturesFlow(partSignedTx, flowSessions, listOf(ourSigningKey), GATHERING_SIGS.childProgressTracker()))
Я попробовал решения, которые были представлены онлайн, а именно:
- , чтобы добавить сеансы всех сторон в качестве параметра к
CollectSignaturesFlow
- I пробовал со всеми конструкторами
CollectSignaturesFlow
, упомянутыми в документации
Я не могу понять, где я иду не так. Может ли кто-нибудь помочь мне с этим? Заранее спасибо!