gpt4 book ai didi

java - 通过API获取所有corda账户

转载 作者:行者123 更新时间:2023-11-30 05:19:52 25 4
gpt4 key购买 nike

我正在尝试获取某个节点上可用的所有帐户。

我正在使用以下代码:

    @RequestMapping("/accounts/all", method = [RequestMethod.GET])
fun allKnownAccounts(): List<AccountInfoView> {
return getAllAccounts().map { it.toAccountView() }
}

private fun getAllAccounts() = rpc.proxy.startFlowDynamic(AllAccounts::class.java, false).returnValue.get()

但是我收到以下错误

There was an unexpected error (type=Internal Server Error, status=500). net.corda.core.flows.IllegalFlowLogicException: A FlowLogicRef cannot be constructed for FlowLogic of type com.r3.corda.lib.accounts.workflows.flows.AllAccounts: due to ambiguous match against the constructors: [class java.lang.Boolean]

我不确定是什么原因导致异常发生。感谢您的所有帮助。

最佳答案

通过将 getAllAccounts() 函数更新为以下内容解决了该问题:

    private fun getAllAccounts() = rpc.proxy.startFlowDynamic(AllAccounts::class.java).returnValue.get()

关于java - 通过API获取所有corda账户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59733016/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com