Documentation ¶
Index ¶
Constants ¶
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 ¶
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 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 (t *ThrottledChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response
func (*ThrottledChaincode) Invoke ¶
func (t *ThrottledChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response
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