MCPcopy
hub / github.com/hyperledger/fabric / chaincodeQuery

Function chaincodeQuery

internal/peer/chaincode/query.go:48–64  ·  view source on GitHub ↗
(cmd *cobra.Command, cf *ChaincodeCmdFactory, cryptoProvider bccsp.BCCSP)

Source from the content-addressed store, hash-verified

46}
47
48func chaincodeQuery(cmd *cobra.Command, cf *ChaincodeCmdFactory, cryptoProvider bccsp.BCCSP) error {
49 if channelID == "" {
50 return errors.New("The required parameter 'channelID' is empty. Rerun the command with -C flag")
51 }
52 // Parsing of the command line is done so silence cmd usage
53 cmd.SilenceUsage = true
54
55 var err error
56 if cf == nil {
57 cf, err = InitCmdFactory(cmd.Name(), true, false, cryptoProvider)
58 if err != nil {
59 return err
60 }
61 }
62
63 return chaincodeInvokeOrQuery(cmd, false, cf)
64}

Callers 1

queryCmdFunction · 0.85

Calls 4

chaincodeInvokeOrQueryFunction · 0.85
InitCmdFactoryFunction · 0.70
NewMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected