Documentation ¶
Index ¶
- type BlockExecutor
- func (exec *BlockExecutor) ApplyReadonlyTransactions(txs []*pb.Transaction) []*pb.Receipt
- func (exec *BlockExecutor) ExecuteBlock(block *pb.Block)
- func (exec *BlockExecutor) Start() error
- func (exec *BlockExecutor) Stop() error
- func (exec *BlockExecutor) SubscribeBlockEvent(ch chan<- events.NewBlockEvent) event.Subscription
- func (exec *BlockExecutor) SyncExecuteBlock(block *pb.Block)
- type Executor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockExecutor ¶
type BlockExecutor struct {
// contains filtered or unexported fields
}
BlockExecutor executes block from order
func New ¶
func New(chainLedger ledger.Ledger, logger logrus.FieldLogger) (*BlockExecutor, error)
New creates executor instance
func (*BlockExecutor) ApplyReadonlyTransactions ¶ added in v1.0.1
func (exec *BlockExecutor) ApplyReadonlyTransactions(txs []*pb.Transaction) []*pb.Receipt
func (*BlockExecutor) ExecuteBlock ¶
func (exec *BlockExecutor) ExecuteBlock(block *pb.Block)
ExecuteBlock executes block from order
func (*BlockExecutor) SubscribeBlockEvent ¶
func (exec *BlockExecutor) SubscribeBlockEvent(ch chan<- events.NewBlockEvent) event.Subscription
SubscribeBlockEvent registers a subscription of NewBlockEvent.
func (*BlockExecutor) SyncExecuteBlock ¶
func (exec *BlockExecutor) SyncExecuteBlock(block *pb.Block)
type Executor ¶
type Executor interface { // Start Start() error // Stop Stop() error // ExecutorBlock ExecuteBlock(*pb.Block) // ApplyReadonlyTransactions execute readonly tx ApplyReadonlyTransactions(txs []*pb.Transaction) []*pb.Receipt // SubscribeBlockEvent SubscribeBlockEvent(chan<- events.NewBlockEvent) event.Subscription }
Click to show internal directories.
Click to hide internal directories.