side

package
v0.0.0-...-791c31d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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"`
}

Jump to

Keyboard shortcuts

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