scc

package
v0.0.0-...-579b097 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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

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

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