We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
It might be expected because of https://github.com/hyperledger/fabric-sdk-go/blob/main/test/fixtures/config/overrides/local_entity_matchers.yaml, but I haven't figured that out yet. Faced with the same issue #265, I resolved by downgrading golang to version 1.18. Reproducible scenario that works in go v1.18, but not higher.
config.yaml
version: 1.0.0 client: tlsEnable: true organization: org1 channels: channel0: orderers: - orderer1.orderer peers: peer0.org1: {} organizations: org1: mspid: Org1MSP cryptoPath: /home/fabric/crypto/orgs/org1/msp peers: - peer0.org1 certificateAuthorities: - ca.org1 users: admin: cert: path: /home/fabric/crypto/orgs/org1/admin/msp/signcerts/cert.pem key: path: /home/fabric/crypto/orgs/org1/admin/msp/keystore/key.pem orderer: mspID: OrdererMSP cryptoPath: /home/fabric/crypto/orderers/msp orderers: orderer1.orderer: url: orderer1.orderer:7050 tlsCACerts: path: /home/fabric/crypto/orderers/admin/tls/ca.pem peers: peer0.org1: url: peer0.org1:7051 tlsCACerts: path: /home/fabric/crypto/orgs/org1/admin/tls/ca.pem certificateAuthorities: ca.org1: url: https://ca.org1:7054 caName: ca.org1 tlsCACerts: path: /home/fabric/crypto/orgs/org1/admin/tls/ca.pem
main.go
package main import ( "fmt" "github.com/hyperledger/fabric-sdk-go/pkg/client/channel" "github.com/hyperledger/fabric-sdk-go/pkg/core/config" "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk" ) const ( channelID = "channel0" orgName = "org1" orgAdmin = "admin" chaincodeID = "samplecc" ) func main() { sdk, err := fabsdk.New(config.FromFile("config.yaml")) if err != nil { fmt.Println(err) } defer sdk.Close() clientChannelContext := sdk.ChannelContext(channelID, fabsdk.WithUser(orgAdmin), fabsdk.WithOrg(orgName)) client, err := channel.New(clientChannelContext) if err != nil { fmt.Println(err) } response, err := client.Execute(channel.Request{ChaincodeID: chaincodeID, Fcn: "YourFunction"}) if err != nil { fmt.Println(err) } fmt.Println(string(response.Payload)) }
The text was updated successfully, but these errors were encountered:
Same issue #260
Sorry, something went wrong.
I've replaced fabric-sdk-go in vendor directory with git clone https://github.com/hyperledger/fabric-sdk-go, and issue was solved.
fabric-sdk-go
git clone https://github.com/hyperledger/fabric-sdk-go
No branches or pull requests
It might be expected because of https://github.com/hyperledger/fabric-sdk-go/blob/main/test/fixtures/config/overrides/local_entity_matchers.yaml, but I haven't figured that out yet. Faced with the same issue #265, I resolved by downgrading golang to version 1.18. Reproducible scenario that works in go v1.18, but not higher.
config.yaml
main.go
The text was updated successfully, but these errors were encountered: