【问题标题】:Corda: How can I know all the info about a specific Transaction?Corda:我怎样才能知道有关特定交易的所有信息?
【发布时间】:2020-02-07 15:29:40
【问题描述】:

我是 Corda 的新手,我已经列出了所有已签名的交易,但现在我正在尝试使用 RPC 列出有关特定交易(通过哈希)的所有信息。

谁能告诉我这是否可行,如果可行,我该怎么做?

非常感谢:)

【问题讨论】:

    标签: hash transactions sdk rpc corda


    【解决方案1】:
        // proxy is returned by the rpc connection   
    
     FlowProgressHandle<SignedTransaction> flowHandle = proxy
                .startTrackedFlowDynamic(YourFlowName.class,
                        Param1,param2
                );
    
        progressTrackerService.getProgressTracker(flowHandle, request);
    
    
        // The line below blocks and waits for the flow to return.
        final SignedTransaction result = flowHandle
                .getReturnValue()
                .get();
    
    
        //suppose I want to get ABCState outputState  from the above txn
        // Like wise you can do any type of filtering on the returned Txn
    
        List<ABCState> aBCStates= result.getTx().outputsOfType
        (ABCState.Class);
    

    【讨论】:

      【解决方案2】:

      在节点 CRaSH shell 中使用您的事务 ID 运行此命令

      run internalFindVerifiedTransaction txnId: <Transaction-ID>
      

      【讨论】:

      • 您好!谢谢您的回答。但是该方法返回一个 SignedTransaction 并且该类没有我需要的东西......我需要获取有关交易的详细信息,即令牌上的交易,而不仅仅是 ID 和公证人。你知道我该怎么做吗?
      • 查看此链接以编程方式获取交易数据[stackoverflow.com/questions/50594282/…
      猜你喜欢
      • 1970-01-01
      • 2021-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-24
      • 1970-01-01
      • 2020-06-13
      • 2012-11-20
      相关资源
      最近更新 更多