lscc

package
v0.0.0-...-523a819 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//安装安装命令
	INSTALL = "install"

	//部署部署命令
	DEPLOY = "deploy"

	//升级升级chaincode
	UPGRADE = "upgrade"

	//CCEXISTS get chaincode
	CCEXISTS = "getid"

	//chaincodeexists获取chaincode别名
	CHAINCODEEXISTS = "ChaincodeExists"

	//getdepspec获取chaincodedeploymentspec
	GETDEPSPEC = "getdepspec"

	//获取chaincodedeploymentspec别名
	GETDEPLOYMENTSPEC = "GetDeploymentSpec"

	//获取链码数据
	GETCCDATA = "getccdata"

	//get chaincodedata获取chaincodedata别名
	GETCHAINCODEDATA = "GetChaincodeData"

	//getchaincodes获取通道上的实例化链码
	GETCHAINCODES = "getchaincodes"

	//getchaincodesalias获取通道上的实例化链码
	GETCHAINCODESALIAS = "GetChaincodes"

	//GetInstalledChaincodes获取对等机上已安装的链代码
	GETINSTALLEDCHAINCODES = "getinstalledchaincodes"

	//getInstalledChaincodesalias获取对等机上已安装的链代码
	GETINSTALLEDCHAINCODESALIAS = "GetInstalledChaincodes"

	//getCollectionsConfig获取链码的集合配置
	GETCOLLECTIONSCONFIG = "GetCollectionsConfig"

	//getCollectionsConfigalias获取链码的集合配置
	GETCOLLECTIONSCONFIGALIAS = "getcollectionsconfig"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChaincodeMismatchErr

type ChaincodeMismatchErr string

两处的chaincode不匹配的chaincode名称不匹配

func (ChaincodeMismatchErr) Error

func (f ChaincodeMismatchErr) Error() string

type CollectionsConfigUpgradesNotAllowed

type CollectionsConfigUpgradesNotAllowed string

未启用v1_2功能时不允许CollectionConfigupGrades

func (CollectionsConfigUpgradesNotAllowed) Error

type DeployedCCInfoProvider

type DeployedCCInfoProvider struct {
}

deployedccinfoprovider实现ineterface分类帐。deployedchaincodeinfo提供程序

func (*DeployedCCInfoProvider) ChaincodeInfo

chaincodeinfo在interface ledger.deployedchaincodeinfo提供程序中实现函数

func (*DeployedCCInfoProvider) CollectionInfo

func (p *DeployedCCInfoProvider) CollectionInfo(chaincodeName, collectionName string, qe ledger.SimpleQueryExecutor) (*common.StaticCollectionConfig, error)

collectioninfo实现接口分类帐中的功能。deployedchaincodeinfo提供程序

func (*DeployedCCInfoProvider) Namespaces

func (p *DeployedCCInfoProvider) Namespaces() []string

命名空间实现接口ledger.deployedchaincodeinfo提供程序中的函数

func (*DeployedCCInfoProvider) UpdatedChaincodes

func (p *DeployedCCInfoProvider) UpdatedChaincodes(stateUpdates map[string][]*kvrwset.KVWrite) ([]*ledger.ChaincodeLifecycleInfo, error)

updatedchaincodes实现接口分类帐中的功能。deployedchaincodeinfo提供程序

type EmptyChaincodeNameErr

type EmptyChaincodeNameErr string

Emptychaincodenameerr尝试升级到相同版本的chaincode

func (EmptyChaincodeNameErr) Error

func (f EmptyChaincodeNameErr) Error() string

type EmptyVersionErr

type EmptyVersionErr string

EmptyVersionErr空版本错误

func (EmptyVersionErr) Error

func (f EmptyVersionErr) Error() string

type ExistsErr

type ExistsErr string

existser链码存在错误

func (ExistsErr) Error

func (t ExistsErr) Error() string

type FilesystemSupport

type FilesystemSupport interface {
	//PutChaincodeToLocalStorage存储提供的链代码
	//包到本地存储(即文件系统)
	PutChaincodeToLocalStorage(ccprovider.CCPackage) error

	//getchaincoderomlocalstorage检索链码包
	//对于请求的链码,由名称和版本指定
	GetChaincodeFromLocalStorage(ccname string, ccversion string) (ccprovider.CCPackage, error)

	//getchaincodesfromlocalstorage返回所有链码的数组
	//以前保存到本地存储的数据
	GetChaincodesFromLocalStorage() (*pb.ChaincodeQueryResponse, error)

	//GetInstantiationPolicy返回
	//提供的链码(如果未指定,则为通道的默认值)
	GetInstantiationPolicy(channel string, ccpack ccprovider.CCPackage) ([]byte, error)

	//checkInstantiationPolicy检查提供的签名建议是否
	//符合提供的实例化策略
	CheckInstantiationPolicy(signedProposal *pb.SignedProposal, chainName string, instantiationPolicy []byte) error
}

文件系统支持包含lscc执行其任务所需的函数

type IdenticalVersionErr

type IdenticalVersionErr string

尝试升级到相同版本的链码的IdenticalVersioner

func (IdenticalVersionErr) Error

func (f IdenticalVersionErr) Error() string

type InstantiationPolicyMissing

type InstantiationPolicyMissing string

当升级CC时找不到现有的实例化策略时,InstantiationPolicyMissing

func (InstantiationPolicyMissing) Error

type InvalidArgsLenErr

type InvalidArgsLenErr int

InvalidArgslener无效参数长度错误

func (InvalidArgsLenErr) Error

func (i InvalidArgsLenErr) Error() string

type InvalidCCOnFSError

type InvalidCCOnFSError string

由于LSCC上的指纹与安装的CC不匹配,导致InvalidConfserRor错误

func (InvalidCCOnFSError) Error

func (f InvalidCCOnFSError) Error() string

type InvalidChaincodeNameErr

type InvalidChaincodeNameErr string

无效的chaincode name错误无效的chaincode name错误

func (InvalidChaincodeNameErr) Error

func (f InvalidChaincodeNameErr) Error() string

type InvalidChannelNameErr

type InvalidChannelNameErr string

无效的频道名称错误无效的频道名称错误

func (InvalidChannelNameErr) Error

func (f InvalidChannelNameErr) Error() string

type InvalidDeploymentSpecErr

type InvalidDeploymentSpecErr string

InvalidDeploymentSpecErr invalid chaincode deployment spec error

func (InvalidDeploymentSpecErr) Error

func (f InvalidDeploymentSpecErr) Error() string

type InvalidFunctionErr

type InvalidFunctionErr string

InvalidFunctionerr无效函数错误

func (InvalidFunctionErr) Error

func (f InvalidFunctionErr) Error() string

type InvalidStatedbArtifactsErr

type InvalidStatedbArtifactsErr string

InvalidStateDBartifactser无效状态数据库项目错误

func (InvalidStatedbArtifactsErr) Error

type InvalidVersionErr

type InvalidVersionErr string

无效版本错误无效版本错误

func (InvalidVersionErr) Error

func (f InvalidVersionErr) Error() string

type LifeCycleSysCC

type LifeCycleSysCC struct {
	//aclprovider负责访问控制评估
	ACLProvider aclmgmt.ACLProvider

	//SCCProvider是传递到系统链码的接口。
	//访问系统的其他部分
	SCCProvider sysccprovider.SystemChaincodeProvider

	//policyChecker是用于执行
	//访问控制
	PolicyChecker policy.PolicyChecker

	//支持提供了
	//静态函数
	Support FilesystemSupport

	PlatformRegistry *platforms.Registry
}

LifecycleSyscc实现了链码生命周期及其周围的策略

func New

新建创建LSCC的新实例 通常每个对等机只有一个

func (*LifeCycleSysCC) Chaincode

func (lscc *LifeCycleSysCC) Chaincode() shim.Chaincode

func (*LifeCycleSysCC) ChaincodeContainerInfo

func (lscc *LifeCycleSysCC) ChaincodeContainerInfo(chaincodeName string, qe ledger.QueryExecutor) (*ccprovider.ChaincodeContainerInfo, error)

func (*LifeCycleSysCC) ChaincodeDefinition

func (lscc *LifeCycleSysCC) ChaincodeDefinition(chaincodeName string, qe ledger.QueryExecutor) (ccprovider.ChaincodeDefinition, error)

func (*LifeCycleSysCC) Enabled

func (lscc *LifeCycleSysCC) Enabled() bool

func (*LifeCycleSysCC) Init

init对scc基本上是无用的

func (*LifeCycleSysCC) InitArgs

func (lscc *LifeCycleSysCC) InitArgs() [][]byte

func (*LifeCycleSysCC) InvokableCC2CC

func (lscc *LifeCycleSysCC) InvokableCC2CC() bool

func (*LifeCycleSysCC) InvokableExternal

func (lscc *LifeCycleSysCC) InvokableExternal() bool

func (*LifeCycleSysCC) Invoke

invoke实现生命周期函数“deploy”、“start”、“stop”、“upgrade”。 deploy的参数-[]byte(“deploy”),[]byte(<chainname>),<unmarshalled pb.chaincodedeploymentspec>

invoke还实现一些类似查询的函数 获取chaincode参数-[]byte(“getid”),[]byte(<chainname>),[]byte(<chaincodename>)

func (*LifeCycleSysCC) Name

func (lscc *LifeCycleSysCC) Name() string

func (*LifeCycleSysCC) Path

func (lscc *LifeCycleSysCC) Path() string

type MarshallErr

type MarshallErr string

封送拆送处理程序错误

func (MarshallErr) Error

func (m MarshallErr) Error() string

type NotFoundErr

type NotFoundErr string

NotFounderr链码未注册为LSCC错误

func (NotFoundErr) Error

func (t NotFoundErr) Error() string

type PrivateChannelDataNotAvailable

type PrivateChannelDataNotAvailable string

未启用v1_2或更高版本功能时,privatechanneldata不可用

func (PrivateChannelDataNotAvailable) Error

type TXNotFoundErr

type TXNotFoundErr string

TxNotFounderr事务未找到错误

func (TXNotFoundErr) Error

func (t TXNotFoundErr) Error() string

Directories

Path Synopsis
此源码被清华学神尹成大魔王专业翻译分析并修改 尹成QQ77025077 尹成微信18510341407 尹成所在QQ群721929980 尹成邮箱 yinc13@mails.tsinghua.edu.cn 尹成毕业于清华大学,微软区块链领域全球最有价值专家 https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 伪造者生成的代码。
此源码被清华学神尹成大魔王专业翻译分析并修改 尹成QQ77025077 尹成微信18510341407 尹成所在QQ群721929980 尹成邮箱 yinc13@mails.tsinghua.edu.cn 尹成毕业于清华大学,微软区块链领域全球最有价值专家 https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 伪造者生成的代码。

Jump to

Keyboard shortcuts

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