科尔达合同升级后的状态不能用作交易输入

时间:2018-12-18 08:18:43

标签: upgrade corda contract

我按照Corda文档中的说明升级了自己的cordapp合同。从控制台和数据库,我知道合同已成功升级。但是,当我将合同升级后的状态用作新的交易输入时,会收到以下错误:

DateTime? lastDate = telPayments
    .Select(telpayment => telpayment.ToDate)
    .FirstOrDefault();

我通过创建特殊的合同升级交易并让一个州的所有参与者使用合同升级流程来签署合同来升级合同。 whiteList好像有问题吗?任何想法都是有帮助的。

我发现以下验证未通过,但是当我打印附件和白名单时,attachmet ID在白名单中。

 net.corda.core.contracts.TransactionVerificationException$ContractConstraintRejection: Contract constraints failed for com.sm2.contract.NewMemberContract, transaction: 4F828B8DFA64EFAB88844C7EDEB140E6D5FA3EB7A8EBF6F294A13FE3C24BBEBE
    at net.corda.core.transactions.LedgerTransaction.verifyConstraints(LedgerTransaction.kt:119) ~[corda-core-3.3-corda.jar:?]
    at net.corda.core.transactions.LedgerTransaction.verify(LedgerTransaction.kt:82) ~[corda-core-3.3-corda.jar:?]
    at net.corda.core.transactions.TransactionBuilder.verify(TransactionBuilder.kt:143) ~[corda-core-3.3-corda.jar:?]
    at com.sm2.flow.MemberUpdateFlow$Initiator.call(MemberUpdateFlow.java:167) ~[contract-upgrade-1.0.jar:?]
    at com.sm2.flow.MemberUpdateFlow$Initiator.call(MemberUpdateFlow.java:33) ~[contract-upgrade-1.0.jar:?]
    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(Unknown Source) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_181]
    at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:62) [corda-node-3.3-corda.jar:?]

}

0 个答案:

没有答案