对等背书策略不起作用

时间:2018-12-26 06:17:05

标签: hyperledger-fabric hyperledger blockchain

我正在尝试为2组织网络实施简单的认可政策。这是我的crypto-config.yaml

OrdererOrgs:
  - Name: Orderer
    Domain: example.com
    Specs:
      - Hostname: orderer
PeerOrgs:
  - Name: Org1
    Domain: org1.example.com
    EnableNodeOUs: true
    # CA:
    #   OrganizationalUnit: peer
    Template:
      Count: 1
    Users:
      Count: 1
  - Name: Org2
    Domain: org2.example.com
    EnableNodeOUs: true
    # CA:
    #   OrganizationalUnit: peer
    Template:
      Count: 1
    Users:
      Count: 1

我可以在两个同伴中看到OU作为同伴。

peer0.org2.example.com  
Identity: peer0.org2.example.com  
Verified by: ca.org2.example.com  
Expires: Saturday 23 December 2028 

主题名称

C (Country):    US  
ST (State): California  
L (Locality):   San Francisco  
OU (Organizational Unit):   peer  
CN (Common Name):   peer0.org2.example.com 

会员检查作品的认可政策

peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n chaincode -l node -v v0 -c '{"args":["init"]}' -P "AND('Org1MSP.member', 'Org2MSP.member')"  

但是对同伴检查的认可政策不起作用

peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n chaincode -l node -v v0 -c '{"args":["init"]}' -P "AND('Org1MSP.peer', 'Org2MSP.peer')"  

当我调用任何功能时。

Transaction failed to be committed to the ledger due to ::ENDORSEMENT_POLICY_FAILURE

即使"OR('Org1MSP.peer', 'Org2MSP.peer')"无效

1 个答案:

答案 0 :(得分:0)

new Actions(driver).moveToElement(
   canvas, xWithinCanvas, yWithinCanvas).perform();
((JavascriptExecutor)driver).executeScript("$('#canvas').click();");

.........模板数s / b更改为2,因为现在有2个组织