cscc

package
v0.0.0-...-fe0f572 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

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

View Source
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 (*PeerConfiger) Init

Init is called once per chain when the chain is created. This allows the chaincode to initialize any variables on the ledger prior to any transaction execution on the chain.

func (*PeerConfiger) Invoke

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL