链码bor已在频道mychannel上成功定义,然后重试:存在'bor'的链码定义,但未安装链码

问题描述 投票:0回答:1

我已经建立了一个超级账本结构网络,如下所示:org1:peer0.org1org2:peer0.org2

链码:1:deed.js2:bor.js

我已经在org1和org2对等节点上安装了chaincodedeed.js。我仅在org2对等服务器上安装了bor.js。

我已经在org1和org2同行上批准了chaincodedeed.js。我已经在org1和org2对等方上提交了链码bor.js。

我已经使用org1和org2对等体调用了链码deed.js。我已经使用org2对等体调用了链码bor.js。

查询deed.js效果很好。但是查询bor.js会引发错误:

错误:查询期间背书失败。响应:状态:500消息:“确保已成功在频道mychannel上定义链码bor,然后重试:存在'bor'的链码定义,但未安装链码”。

[我知道错误是由于我没有在org1上安装chaincode bor.js,但是我的项目使得我必须仅在org2上安装bor.js智能合约,而在org1上没有安装。

以下是我对configtx.yaml的应用程序的认可策略部分:

应用程序:&ApplicationDefaults

# Organizations is the list of orgs which are defined as participants on
# the application side of the network
Organizations:

# Policies defines the set of policies at this level of the config tree
# For Application policies, their canonical path is
#   /Channel/Application/<PolicyName>
Policies:
    Readers:
        Type: ImplicitMeta
        Rule: "ANY Readers"
    Writers:
        Type: ImplicitMeta
        Rule: "ANY Writers"
    Admins:
        Type: ImplicitMeta
        Rule: "MAJORITY Admins"
    LifecycleEndorsement:
        Type: ImplicitMeta
        Rule: "MAJORITY Endorsement"
    Endorsement:
        Type: ImplicitMeta
        Rule: "MAJORITY Endorsement"

Capabilities:
    <<: *ApplicationCapabilities

通过仅在org2对等体上安装bor.js,有没有办法对bor.js链码执行查询操作而没有错误?。

我已经建立了一个超级账本结构网络,如下所示:org1:peer0.org1 org2:peer0.org2链码:1:deed.js 2:bor.js我已经在org1和org2对等体上安装了链码deed.js。我已经安装了...

hyperledger-fabric hyperledger hyperledger-chaincode
1个回答
0
投票

[如果我没错,您创建了一个频道,并且您正在尝试安装2个链码。

© www.soinside.com 2019 - 2024. All rights reserved.