1

[fabsdk/fab] 2020/09/11 08:57:44 UTC - dispatcher.(*Dispatcher).HandleConnectEvent -> WARN 错误创建连接:无法连接到 peer0.org1.example.com:7051:在目标上拨号连接[peer0.org1.example.com:7051]:连接处于 TRANSIENT_FAILURE

func ApproveCC(packageID string, orgResMgmt *resmgmt.Client, orgInfo *InitInfo) {
    ccPolicy := policydsl.SignedByAnyMember([]string{"Org1MSP"})
    approveCCReq := resmgmt.LifecycleApproveCCRequest{
        Name:              orgInfo.CCID,
        Version:           "0",
        PackageID:         packageID,
        Sequence:          1,
        EndorsementPlugin: "escc",
        ValidationPlugin:  "vscc",
        SignaturePolicy:   ccPolicy,
        InitRequired:      true,
    }

    txnID, err := orgResMgmt.LifecycleApproveCC(orgInfo.ChannelID, approveCCReq, resmgmt.WithTargetEndpoints(orgInfo.OrgPeer0), resmgmt.WithOrdererEndpoint("orderer.example.com"), resmgmt.WithRetry(retry.DefaultResMgmtOpts))
    if err != nil {
        fmt.Printf("LifecycleApproveCC: %v", err)
    }
    fmt.Println("===LifecycleApproveCC===", txnID)
    //require.NotEmpty(t, txnID)
}
4

0 回答 0