Documentation ¶
Overview ¶
Package 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.
Index ¶
- Constants
- type PeerConfiger
- func (e *PeerConfiger) Chaincode() shim.Chaincode
- func (e *PeerConfiger) Enabled() bool
- func (e *PeerConfiger) Init(stub shim.ChaincodeStubInterface) pb.Response
- func (e *PeerConfiger) InitArgs() [][]byte
- func (e *PeerConfiger) InvokableCC2CC() bool
- func (e *PeerConfiger) InvokableExternal() bool
- func (e *PeerConfiger) Invoke(stub shim.ChaincodeStubInterface) pb.Response
- func (e *PeerConfiger) InvokeNoShim(args [][]byte, sp *pb.SignedProposal) pb.Response
- func (e *PeerConfiger) Name() string
- func (e *PeerConfiger) Path() string
Constants ¶
const ( JoinChain string = "JoinChain" GetConfigBlock string = "GetConfigBlock" GetChannels string = "GetChannels" GetConfigTree string = "GetConfigTree" SimulateConfigTreeUpdate string = "SimulateConfigTreeUpdate" )
These are function names from Invoke first parameter
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerConfiger ¶
type PeerConfiger struct {
// contains filtered or unexported fields
}
PeerConfiger 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.
func New ¶ added in v1.2.0
func New(ccp ccprovider.ChaincodeProvider, sccp sysccprovider.SystemChaincodeProvider, aclProvider aclmgmt.ACLProvider) *PeerConfiger
New creates a new instance of the CSCC. Typically, only one will be created per peer instance.
func (*PeerConfiger) Chaincode ¶ added in v1.3.0
func (e *PeerConfiger) Chaincode() shim.Chaincode
func (*PeerConfiger) Enabled ¶ added in v1.3.0
func (e *PeerConfiger) Enabled() bool
func (*PeerConfiger) Init ¶
func (e *PeerConfiger) Init(stub shim.ChaincodeStubInterface) pb.Response
Init is mostly useless from an SCC perspective
func (*PeerConfiger) InitArgs ¶ added in v1.3.0
func (e *PeerConfiger) InitArgs() [][]byte
func (*PeerConfiger) InvokableCC2CC ¶ added in v1.3.0
func (e *PeerConfiger) InvokableCC2CC() bool
func (*PeerConfiger) InvokableExternal ¶ added in v1.3.0
func (e *PeerConfiger) InvokableExternal() bool
func (*PeerConfiger) Invoke ¶
func (e *PeerConfiger) Invoke(stub shim.ChaincodeStubInterface) pb.Response
Invoke 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
func (*PeerConfiger) InvokeNoShim ¶ added in v1.2.0
func (e *PeerConfiger) InvokeNoShim(args [][]byte, sp *pb.SignedProposal) pb.Response
func (*PeerConfiger) Name ¶ added in v1.3.0
func (e *PeerConfiger) Name() string
func (*PeerConfiger) Path ¶ added in v1.3.0
func (e *PeerConfiger) Path() string