【发布时间】:2018-01-10 16:28:10
【问题描述】:
我正在研究一个涉及三方的用例,比如说 PartyA、PartyB 和 PartyC。
在这种情况下,
PartyA 发出一个 dealState(A 是唯一的参与者),
甲方将其卖给乙方(甲、乙为参与者),
现在甲方想把这个状态卖给丙方,但我们需要甲乙双方的签名,以及丙方接受销售过程的签名。
如何在第三种情况下收集原始发行方甲方的签名以使流程正常运行?
流程中的代码是这个(我作为PartyB销售)
val newOwnerFlow = initiateFlow(PartyC)
progressTracker.currentStep = GATHERING_SIGS
println("Finished gathering signatures stage 9")
// Send the state to the counterparty, and receive it back with their signature.
val fullySignedTx = subFlow(CollectSignaturesFlow(partSignedTx, setOf(newOwnerFlow), GATHERING_SIGS.childProgressTracker()))
// Stage 10.
progressTracker.currentStep = FINALISING_TRANSACTION
println("Finalizing transaction")
// Notarise and record the transaction in both parties' vaults.
return subFlow(FinalityFlow(fullySignedTx, FINALISING_TRANSACTION.childProgressTracker()))
如何让甲方签署交易?
【问题讨论】: