,當我嘗試運行這個測試,在cordapp模板的流程:失敗/錯誤尚未啓動
@Test
fun flowRecordTransactionInBothVaults() {
val flow = IOUFlow.Initiator(1,b.info.legalIdentity)
val future = a.services.startFlow(flow).resultFuture
net.runNetwork()
val signedTx = future.getOrThrow()
for (node in listOf(a,b)) {
assertEquals(signedTx, node.storage.validatedTransactions.getTransaction(signedTx.id))
}
}
我得到這個錯誤:進度跟蹤器有沒有已開始
[INFO ] 15:14:52.144 [Mock network] AbstractNetworkMapService.processRegistrationRequest - Added node CN=Mock Company 3,O=R3,L=New York,C=US to network map
[WARN ] 15:14:52.172 [Mock network] [a11087fc-381d-4547-8736-5265c334c71f].maybeWireUpProgressTracking - ProgressTracker has not been started
[WARN ] 15:14:52.191 [Mock network] [0dcfa270-b1af-40e9-92f1-411334cf0c73].run - Terminated by unexpected exceptionkotlin.NotImplementedError: An operation is not implemented: not implemented
at com.template.flow.IOUFlow$Acceptor$call$1.checkTransaction(TemplateFlow.kt:225) ~[main/:?]
at net.corda.flows.SignTransactionFlow.call(CollectSignaturesFlow.kt:201) ~[corda-core-0.13.0.jar:?]
at net.corda.flows.SignTransactionFlow.call(CollectSignaturesFlow.kt:177) ~[corda-core-0.13.0.jar:?]
[WARN ] 15:14:52.202 [Mock network] [a11087fc-381d-4547-8736-5265c334c71f].run - Terminated by unexpected exceptionnet.corda.core.flows.FlowSessionException: Counterparty flow on CN=Mock Company 3,O=R3,L=New York,C=US had an internal error and has terminated
at net.corda.node.services.statemachine.FlowStateMachineImpl.erroredEnd(FlowStateMachineImpl.kt:382) ~[corda-node
[WARN ] 15:14:52.203 [Mock network] [a11087fc-381d-4547-8736-5265c334c71f].uncaughtException - Caught exception from flowjava.lang.IllegalStateException: Progress tracker has already ended
at net.corda.core.utilities.ProgressTracker.endWithError
其實代碼要長得多,但我認爲這些是相關的部分。這是一件已知的事情嗎?我該如何解決它?
該模板的哪個版本/結帳正在運行? –
build.gradle Corda版本設置爲0.13.0,但是,我敢肯定它來自git的主人,我已經使用克隆HTTPS功能克隆它,如果這不是您想要的,我該如何檢查正確的版本/結帳? –
這是你自己的測試還是現有的測試?我無法在模板代碼庫中找到此測試。看起來你可能會使用SignTransactionFlow而不重寫checkTransaction? – joel