关于Corda 3.0 Postgres 9.6.
假设银行节点中有一个已转换为LinearState
的
A lifecycle in Tx1 -> B lifecycle in Tx2 -> C lifecycle in Tx3 -> D lifecycle in Tx4
。
我有一个空金库的调整器。根据可观测的概念,当银行将Tx4
发送给监管机构时。监管机构将在D lifecycle
in vault_states
设立未消费的vault_states
--这既好又好。
如果银行在上述操作之后不正确地将Tx2
发送给监管机构,那么监管机构将在B lifecycle
记录相同UUID的两个未使用状态,并记录D lifecycle
快照。这是预期的行为吗?
另一种情况
Tx2
,然后依次发送Tx4
,则Tx2
和Tx4
都未消耗。Tx2
,然后按顺序发送Tx3
,则Tx2
将被消耗,Tx3
未被消耗。下面的代码片段
class ReportToCounterparty(
private val regulator: Party,
private val signedTx: SignedTransaction) : FlowLogic<SignedTransaction>() {
@Suspendable
override fun call(): SignedTransaction {
val session = initiateFlow(regulator)
subFlow(IdentitySyncFlow.Send(session, signedTx.tx))
subFlow(SendTransactionFlow(session, signedTx))
return session.receive<SignedTransaction>().unwrap { it }
}
}
@InitiatedBy(ReportToCounterparty::class)
class ReceiveReportedTransaction(private val otherSideSession: FlowSession) : FlowLogic<Unit>() {
@Suspendable
override fun call() {
// TODO: add error handling
subFlow(IdentitySyncFlow.Receive(otherSideSession))
val recorded = subFlow(ReceiveTransactionFlow(otherSideSession, true, StatesToRecord.ALL_VISIBLE))
otherSideSession.send(recorded)
}
}
发布于 2018-07-19 09:10:41
这似乎是个窃听器。它在这里被跟踪:https://r3-cev.atlassian.net/browse/CORDA-1828。
https://stackoverflow.com/questions/51414594
复制相似问题