scc

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 9 Imported by: 770

Documentation

Index

Constants

View Source
const SysCCVersion = "syscc"

SysCCVersion is a constant used for the version field of system chaincodes. Historically, the version of a system chaincode was implicitly tied to the exact build version of a peer, which does not work for collecting endorsements across sccs across peers. Until there is a need for separate SCC versions, we use this constant here.

Variables

This section is empty.

Functions

func ChaincodeID

func ChaincodeID(ccName string) string

ChaincodeID returns the chaincode ID of a system chaincode of a given name.

func DeploySysCC

func DeploySysCC(sysCC SelfDescribingSysCC, chaincodeStreamHandler ChaincodeStreamHandler)

DeploySysCC is the hook for system chaincodes where system chaincodes are registered with the fabric. This call directly registers the chaincode with the chaincode handler and bypasses the other usercc constructs.

Types

type BuiltinSCCs

type BuiltinSCCs map[string]struct{}

BuiltinSCCs are special system chaincodes, differentiated from other (plugin) system chaincodes. These chaincodes do not need to be initialized in '_lifecycle' and may be invoked without a channel context. It is expected that '_lifecycle' will eventually be the only builtin SCCs. Note, this field should only be used on _endorsement_ side, never in validation as it might change.

func (BuiltinSCCs) IsSysCC

func (bccs BuiltinSCCs) IsSysCC(name string) bool

type ChaincodeStreamHandler

type ChaincodeStreamHandler interface {
	HandleChaincodeStream(ccintf.ChaincodeStream) error
	LaunchInProc(packageID string) <-chan struct{}
}

A ChaincodeStreamHandler is responsible for handling the ChaincodeStream communication between a per and chaincode.

type SelfDescribingSysCC added in v1.3.0

type SelfDescribingSysCC interface {
	//Unique name of the system chaincode
	Name() string

	// Chaincode returns the underlying chaincode
	Chaincode() shim.Chaincode
}

type SendPanicFailure

type SendPanicFailure string

SendPanicFailure

func (SendPanicFailure) Error

func (e SendPanicFailure) Error() string

type ThrottledChaincode

type ThrottledChaincode struct {
	// contains filtered or unexported fields
}

func (*ThrottledChaincode) Init

func (*ThrottledChaincode) Invoke

type ThrottledSysCC

type ThrottledSysCC struct {
	SelfDescribingSysCC
	// contains filtered or unexported fields
}

func Throttle

func Throttle(limit int, systemCC SelfDescribingSysCC) *ThrottledSysCC

func (*ThrottledSysCC) Chaincode

func (t *ThrottledSysCC) Chaincode() shim.Chaincode

Directories

Path Synopsis
Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured.
Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured.
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
mock
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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