scc

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: GPL-3.0, GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeDeploySysCC

func DeDeploySysCC(chainID string, syscc *SystemChaincode, dontRmCon bool) error

DeDeploySysCC stops the system chaincode and deregisters it from inproccontroller

func DeDeploySysCCs

func DeDeploySysCCs(chainID string)

DeDeploySysCCs is used in unit tests to stop and remove the system chaincodes before restarting them in the same process. This allows clean start of the system in the same process

func DeploySysCCs

func DeploySysCCs(chainID string)

DeploySysCCs is the hook for system chaincodes where system chaincodes are registered note the chaincode must still be deployed and launched like a user chaincode will be

func IsSysCC

func IsSysCC(name string) bool

IsSysCC returns true if the name matches a system chaincode's system chaincode names are system, chain wide

func IsSysCCAndNotInvokableCC2CC

func IsSysCCAndNotInvokableCC2CC(name string) bool

IsSysCCAndNotInvokableCC2CC returns true if the chaincode is a system chaincode and *CANNOT* be invoked through a cc2cc invocation

func IsSysCCAndNotInvokableExternal

func IsSysCCAndNotInvokableExternal(name string) bool

IsSysCCAndNotInvokableExternal returns true if the chaincode is a system chaincode and *CANNOT* be invoked through a proposal to this peer

func MockResetSysCCs

func MockResetSysCCs(mockSysCCs []*SystemChaincode)

MockResetSysCCs restore orig system ccs - is used only for testing

func RegisterSysCCs

func RegisterSysCCs()

RegisterSysCCs is the hook for system chaincodes where system chaincodes are registered note the chaincode must still be deployed and launched like a user chaincode will be

Types

type SystemChaincode

type SystemChaincode struct {
	//
	Id []byte
	//Unique name of the system chaincode
	Name string

	//Path to the system chaincode; currently not used
	Path string

	Version string

	//InitArgs initialization arguments to startup the system chaincode
	InitArgs [][]byte

	// Chaincode is the actual chaincode object
	Chaincode shim.Chaincode

	// InvokableExternal keeps track of whether
	// this system chaincode can be invoked
	// through a proposal sent to this peer
	InvokableExternal bool

	// InvokableCC2CC keeps track of whether
	// this system chaincode can be invoked
	// by way of a chaincode-to-chaincode
	// invocation
	InvokableCC2CC bool

	// Enabled a convenient switch to enable/disable system chaincode without
	// having to remove entry from importsysccs.go
	Enabled bool
}

SystemChaincode defines the metadata needed to initialize system chaincode when the comes up. SystemChaincodes are installed by adding an entry in importsysccs.go

func MockRegisterSysCCs

func MockRegisterSysCCs(mockSysCCs []*SystemChaincode) []*SystemChaincode

MockRegisterSysCCs is used only for testing This is needed to break import cycle

func SysCCsList

func SysCCsList() ([]*SystemChaincode, int, error)

Jump to

Keyboard shortcuts

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