Это нормально работает для меня в Corda 3.
Вот мое состояние:
class MyState(val party: Party?) : ContractState {
override val participants: List<AbstractParty> get() = listOf()
}
А вот мой поток:
@InitiatingFlow
@StartableByRPC
class Initiator : FlowLogic<Unit>() {
override val progressTracker = ProgressTracker()
@Suspendable
override fun call() {
val myState = MyState(null)
val txCommand = Command(MyContract.Commands.Command(), ourIdentity.owningKey)
val notary = serviceHub.networkMapCache.notaryIdentities[0]
val txBuilder = TransactionBuilder(notary)
.addOutputState(myState, MY_CONTRACT_ID)
.addCommand(txCommand)
// Verifying the builder.
txBuilder.verify(serviceHub)
// Verifying the signed transaction.
serviceHub.signInitialTransaction(txBuilder).verify(serviceHub)
}
}
Проверка либо строителяили подписанная транзакция не вызывает проблем.Это верно как для Kotlin, так и для Java.