serviceInterface

package
v0.0.0-...-fdc5c16 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceInterface

func NewServiceInterface(
	name string,
	chain *chainStructure.Blockchain,
	p2p *chainNetwork.P2PService,
	apiServers *chainApi.ApiServers,
) service.IService

Types

type BlockchainService

type BlockchainService struct {
	// contains filtered or unexported fields
}

func (*BlockchainService) Cancel

func (b *BlockchainService) Cancel(srvData interface{}) (err error)

placeholder for action rollback

func (*BlockchainService) Execute

func (b *BlockchainService) Execute(data interface{}) (result []byte, err error)

storage a new block

func (*BlockchainService) Information

func (b *BlockchainService) Information() (info service.BasicInformation)

func (*BlockchainService) Name

func (b *BlockchainService) Name() (name string)

service name

func (*BlockchainService) PreExecute

func (b *BlockchainService) PreExecute(data interface{}) (result []byte, err error)

handle the new block received from consensus

func (*BlockchainService) RequestsForConsensus

func (b *BlockchainService) RequestsForConsensus(lastReqs []interface{}) (req [][]byte, cnt uint32)

build a new block for consensus

Jump to

Keyboard shortcuts

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