Documentation ¶
Index ¶
- func BuildEmbeddedCC(spec *protos.ChaincodeSpec) (*protos.ChaincodeDeploymentSpec, error)
- func LaunchEmbeddedCC(ctx context.Context, name, chain string, args [][]byte, ...) error
- func LaunchEmbeddedCCFull(ctx context.Context, name, chain string, args [][]byte, ...) (error, *protos.ChaincodeDeploymentSpec, []ledger.TxExecStates)
- func RegisterAndLaunchSysCC(ctx context.Context, syscc *SystemChaincode, ledger ...*ledger.Ledger) error
- func RegisterECC(ecc *EmbeddedChaincode) error
- type EmbeddedChaincode
- type SystemChaincode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildEmbeddedCC ¶
func BuildEmbeddedCC(spec *protos.ChaincodeSpec) (*protos.ChaincodeDeploymentSpec, error)
"build" a given chaincode code (the origin buildSysCC) no chaincodeid.path is specified in the input ChaincodeSpec, API help to search the corresponding registry and build correspoinding path
func LaunchEmbeddedCC ¶
func LaunchEmbeddedCCFull ¶
func LaunchEmbeddedCCFull(ctx context.Context, name, chain string, args [][]byte, ledgers ...*ledger.Ledger) (error, *protos.ChaincodeDeploymentSpec, []ledger.TxExecStates)
We MUST take care of the output state: it maybe not replay able because of the execution timestamp is variant and the result is NEVER combinded with any transaction
func RegisterAndLaunchSysCC ¶
func RegisterAndLaunchSysCC(ctx context.Context, syscc *SystemChaincode, ledger ...*ledger.Ledger) error
RegisterSysCC registers the given system chaincode with the peer
func RegisterECC ¶
func RegisterECC(ecc *EmbeddedChaincode) error
Types ¶
type EmbeddedChaincode ¶
type SystemChaincode ¶
type SystemChaincode struct { // Enabled a convenient switch to enable/disable system chaincode without // having to remove entry Enabled bool // if syscc is enforced, register process throw error when this code is not // allowed on whitelist Enforced bool //Unique name of the system chaincode Name string //Path to the system chaincode; currently not used Path string //InitArgs initialization arguments to startup the system chaincode, //notice this should include the function name as the first arg InitArgs [][]byte // Chaincode is the actual chaincode object Chaincode shim.Chaincode Deployed *protos.ChaincodeDeploymentSpec }
SystemChaincode defines the metadata needed to initialize system chaincode when the fabric comes up. SystemChaincodes are installed by adding an entry in importsysccs.go
Click to show internal directories.
Click to hide internal directories.