{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cscc\n\nPackage cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.\n\n## Constants\n\n```go\nconst (\n\tJoinChain                string = \"JoinChain\"\n\tGetConfigBlock           string = \"GetConfigBlock\"\n\tGetChannels              string = \"GetChannels\"\n\tGetConfigTree            string = \"GetConfigTree\"\n\tSimulateConfigTreeUpdate string = \"SimulateConfigTreeUpdate\"\n)\n```\nThese are function names from Invoke first parameter\n\n## Types\n\n```go\ntype PeerConfiger struct {\n\t// contains filtered or unexported fields\n}\n```\nPeerConfiger implements the configuration handler for the peer. For every configuration transaction coming in from the ordering service, the committer calls this system chaincode to process the transaction.\n\n```go\nfunc New(ccp ccprovider.ChaincodeProvider, sccp sysccprovider.SystemChaincodeProvider, aclProvider aclmgmt.ACLProvider) *PeerConfiger\n```\nNew creates a new instance of the CSCC. Typically, only one will be created per peer instance.\n\n```go\nfunc (e *PeerConfiger) Chaincode() shim.Chaincode\n```\n\n```go\nfunc (e *PeerConfiger) Enabled() bool\n```\n\n```go\nfunc (e *PeerConfiger) Init(stub shim.ChaincodeStubInterface) pb.Response\n```\nInit is mostly useless from an SCC perspective\n\n```go\nfunc (e *PeerConfiger) InitArgs() [][]byte\n```\n\n```go\nfunc (e *PeerConfiger) InvokableCC2CC() bool\n```\n\n```go\nfunc (e *PeerConfiger) InvokableExternal() bool\n```\n\n```go\nfunc (e *PeerConfiger) Invoke(stub shim.ChaincodeStubInterface) pb.Response\n```\nInvoke is called for the following: # to process joining a chain (called by app as a transaction proposal) # to get the current configuration block (called by app) # to update the configuration block (called by committer) Peer calls this function with 2 arguments: # args\\[0] is the function name, which must be JoinChain, GetConfigBlock or UpdateConfigBlock # args\\[1] is a configuration Block if args\\[0] is JoinChain or UpdateConfigBlock; otherwise it is the chain id TODO: Improve the scc interface to avoid marshal/unmarshal args\n\n```go\nfunc (e *PeerConfiger) InvokeNoShim(args [][]byte, sp *pb.SignedProposal) pb.Response\n```\n\n```go\nfunc (e *PeerConfiger) Name() string\n```\n\n```go\nfunc (e *PeerConfiger) Path() string\n```\n\n","path":"github.com/eric-erki/https-hyperledger.org/core/scc/cscc","name":"cscc","synopsis":"Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured.","isRedistributable":true}
