密钥事务 58C11D 上缺少签名:DL9YufujsPipKTb8fjj82ogVS1s67PBWD3vn2fGzjU



我正在使用Corda版本4。

我的CorDapp有四个节点 - 公证节点(正在验证(,"节点A","节点B"和"节点C"。以下是应用中定义的流 -

流程 1:"节点 A"签名并向"节点 B"发送交易请求。还会通知"节点 C"。

以下是我的流 1 代码:

val tx = TransactionBuilder(notary).withItems(
              StateAndContract(tradeProposal, IOU_CONTRACT_ID),
              Command(IOUContract.Commands.Issue(),     listOf(tradeProposal.sender.owningKey)))
              .addAttachment(secHash)
tx.setTimeWindow(serviceHub.clock.instant(), 180.seconds)
val signedTx = serviceHub.signInitialTransaction(tx)
signedTx.verify(serviceHub)
val NodeBFlow = initiateFlow(NodeB)
val NodeCFlow = initiateFlow(NodeC)
subFlow(FinalityFlow(signedTx, listOf(NodeBFlow ,NodeCFlow )))
return signedTx.tx.outRef<State>(0)

流程 2:"节点 B"批准交易请求,自签名,从 A 获得签名并关闭交易。还会通知"节点 C"。

val tx = TransactionBuilder(notary).
withItems(
latestRecord,
StateAndContract(newState, IOU_CONTRACT_ID),
Command(IOUContract.Commands.Completed(),
newState.participants.map { it.owningKey }))
tx.setTimeWindow(serviceHub.clock.instant(), 600.seconds)
tx.verify(serviceHub)
val partSignedTx = serviceHub.signInitialTransaction(tx)
val NodeAFlow = initiateFlow(newState.sender)
val NodeCFlow = initiateFlow(newState.recipient2)
val fullySignedTx = subFlow(CollectSignaturesFlow(partSignedTx,     setOf(NodeAFlow ,NodeCFlow)))
return subFlow(FinalityFlow(fullySignedTx, listOf(NodeAFlow ,NodeCFlow)))

我在执行流程 1 时收到以下错误 -

Missing signatures on transaction 58C11D for keys:         aL9YufujsPipKTb8fjj897654322ogVS1s67PBWD3vn2fGzjUbEnN, by signers: notary
net.corda.core.transactions.SignedTransaction$SignaturesMissingException:     Missing signatures on transaction 58C11D for keys:         aL9YufujsPipKTb8fjj897654322ogVS1s67PBWD3vn2fGzjUbEnN, by signers: notary

公证人抛出该错误是因为 NodeC 包含在 FinalityFlow(将事务发送给公证人(中,但它不是事务签名者的一部分

如果你想通知节点C而不让它成为交易的必需参与者和签署者,你想使用"观察者"类型的设置,你可以在这里找到一个代码示例:

https://docs.corda.net/tutorial-observer-nodes.html

  • R3 的开发者关系

相关内容

  • 没有找到相关文章

最新更新