Documentation
¶
Index ¶
Constants ¶
View Source
const ( ParaChainStatusStart = 0 ParaChainStatusStop = 1 )
View Source
const (
ConfigName = "engine.yaml"
)
View Source
const (
ParaChainKernelContract = "$parachain"
)
Variables ¶
View Source
var ( // ErrCreateBlockChain is returned when create block chain error ErrCreateBlockChain = errors.New("create blockChain error") ErrGroupNotFound = errors.New("group not found") ErrUnAuthorized = errors.New("unAuthorized") ErrChainNotFound = errors.New("chain not found") ErrCtxEmpty = errors.New("chain context is not found") ErrBcNameEmpty = errors.New("block chain name is empty") ErrBcDataEmpty = errors.New("first block data is empty") ErrAdminEmpty = errors.New("no administrator") )
Functions ¶
func IsParaChainEnable ¶
func NewParaChainContract ¶
func NewParaChainContract(bcName string, minNewChainAmount int64, chainCtx *engineBase.ChainCtx) *paraChainContract
Types ¶
type Group ¶
type Group struct { GroupID string `json:"name,omitempty"` Admin []string `json:"admin,omitempty"` Identities []string `json:"identities,omitempty"` Status int `json:"status,omitempty"` }
////////// Group ///////////
func GetParaChainGroup ¶
func GetParaChainGroup(reader ledger.SnapshotReader, bcname string) (Group, error)
type Manager ¶
type Manager struct {
Ctx *ParaChainCtx
}
Manager
func NewParaChainManager ¶
func NewParaChainManager(ctx *ParaChainCtx) (*Manager, error)
NewParaChainManager create instance of ParaChain
type ParaChainConfig ¶
type ParaChainConfig struct {
MinNewChainAmount string
}
type ParaChainCtx ¶
type ParaChainCtx struct { // 基础上下文 xctx.BaseCtx BcName string Contract contractBase.Manager ChainCtx *base.ChainCtx }
ParaChainCtx 这个可能和ChainCtx重复了
func NewParaChainCtx ¶
func NewParaChainCtx(bcName string, cctx *base.ChainCtx) (*ParaChainCtx, error)
Click to show internal directories.
Click to hide internal directories.