Documentation ¶
Index ¶
- func Client() types.ClientInterface
- func CreateClient(typ types.ClientType, cfg *config.ConfigData)
- func HandSideBlock(block *chainhandler.Block, actions []chainhandler.Action)
- func InitCommitWorker(clientCfg *config.ConfigData, committers []cfg.Relayer, ...)
- type ActionToCommit
- type ActionsToRelay
- type BlockToForceio
- type PermissionLevelToCommit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client() types.ClientInterface
func CreateClient ¶
func CreateClient(typ types.ClientType, cfg *config.ConfigData)
CreateClient create client to force relay chain
func HandSideBlock ¶
func HandSideBlock(block *chainhandler.Block, actions []chainhandler.Action)
HandSideBlock handle block from side chain
func InitCommitWorker ¶
func InitCommitWorker(clientCfg *config.ConfigData, committers []cfg.Relayer, sideChainType types.ClientType)
Types ¶
type ActionToCommit ¶
type ActionToCommit struct { Account interface{} `json:"account"` Name interface{} `json:"name"` Authorization []PermissionLevelToCommit `json:"authorization"` Data []byte `json:"data"` }
type ActionsToRelay ¶
type ActionsToRelay struct { Contracts []string Actions []string // contains filtered or unexported fields }
ActionsToRelay actions need to relay
func GetRelayActions ¶
func GetRelayActions(chainTyp types.ClientType) (*ActionsToRelay, error)
GetRelayActions get actions need to relay
func NewActionsToRelay ¶
func NewActionsToRelay(chainType types.ClientType) *ActionsToRelay
func (*ActionsToRelay) Append ¶
func (a *ActionsToRelay) Append(name, actContract, actName string, data handlersInfo)
func (*ActionsToRelay) IsNeedCommit ¶
func (a *ActionsToRelay) IsNeedCommit(contract, name string, data []byte) bool
type BlockToForceio ¶
type BlockToForceio struct { Producer forceio.AccountName `json:"producer"` Num uint32 `json:"num"` ID forceio.Checksum256 `json:"id"` Previous forceio.Checksum256 `json:"previous"` Confirmed uint16 `json:"confirmed"` TransactionMRoot forceio.Checksum256 `json:"transaction_mroot"` ActionMRoot forceio.Checksum256 `json:"action_mroot"` }
func GetLastCommittedBlock ¶
func GetLastCommittedBlock() (*BlockToForceio, error)
GetLastCommittedBlock get last committed block to relay chain
func (*BlockToForceio) FromGeneral ¶
func (b *BlockToForceio) FromGeneral(sw types.SwitcherInterface, bk *chainhandler.Block)
type PermissionLevelToCommit ¶
type PermissionLevelToCommit struct { Actor interface{} `json:"actor"` Permission interface{} `json:"permission"` }
Click to show internal directories.
Click to hide internal directories.