Documentation ¶
Index ¶
- func NewServiceInterface(name string, chain *chainStructure.Blockchain, p2p *chainNetwork.P2PService, ...) service.IService
- type BlockchainService
- func (b *BlockchainService) Cancel(srvData interface{}) (err error)
- func (b *BlockchainService) Execute(data interface{}) (result []byte, err error)
- func (b *BlockchainService) Information() (info service.BasicInformation)
- func (b *BlockchainService) Name() (name string)
- func (b *BlockchainService) PreExecute(data interface{}) (result []byte, err error)
- func (b *BlockchainService) RequestsForConsensus(lastReqs []interface{}) (req [][]byte, cnt uint32)
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) 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
Click to show internal directories.
Click to hide internal directories.