Documentation ¶
Index ¶
- func NewSerialExecutor(f1 agency.ApplyTxFunc, f2 agency.RegisterContractFunc, ...) agency.TxsExecutor
- type BlockExecutor
- func (exec *BlockExecutor) ApplyReadonlyTransactions(txs []*pb.Transaction) []*pb.Receipt
- func (exec *BlockExecutor) ExecuteBlock(block *pb.CommitEvent)
- func (exec *BlockExecutor) Start() error
- func (exec *BlockExecutor) Stop() error
- func (exec *BlockExecutor) SubscribeBlockEvent(ch chan<- events.ExecutedEvent) event.Subscription
- type Executor
- type SerialExecutor
- func (se *SerialExecutor) AddInterchainCounter(to string, index uint64)
- func (se *SerialExecutor) AddNormalTx(hash *types.Hash)
- func (se *SerialExecutor) ApplyTransactions(txs []*pb.Transaction) []*pb.Receipt
- func (se *SerialExecutor) GetBoltContracts() map[string]agency.Contract
- func (se *SerialExecutor) GetInterchainCounter() map[string][]uint64
- func (se *SerialExecutor) GetNormalTxs() []*types.Hash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSerialExecutor ¶ added in v1.0.1
func NewSerialExecutor(f1 agency.ApplyTxFunc, f2 agency.RegisterContractFunc, logger logrus.FieldLogger) agency.TxsExecutor
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, typ string) (*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.CommitEvent)
ExecuteBlock executes block from order
func (*BlockExecutor) SubscribeBlockEvent ¶
func (exec *BlockExecutor) SubscribeBlockEvent(ch chan<- events.ExecutedEvent) event.Subscription
SubscribeBlockEvent registers a subscription of ExecutedEvent.
type Executor ¶
type Executor interface { // Start Start() error // Stop Stop() error // ExecutorBlock ExecuteBlock(commitEvent *pb.CommitEvent) // ApplyReadonlyTransactions execute readonly tx ApplyReadonlyTransactions(txs []*pb.Transaction) []*pb.Receipt // SubscribeBlockEvent SubscribeBlockEvent(chan<- events.ExecutedEvent) event.Subscription }
type SerialExecutor ¶ added in v1.0.1
type SerialExecutor struct {
// contains filtered or unexported fields
}
func (*SerialExecutor) AddInterchainCounter ¶ added in v1.0.1
func (se *SerialExecutor) AddInterchainCounter(to string, index uint64)
func (*SerialExecutor) AddNormalTx ¶ added in v1.0.1
func (se *SerialExecutor) AddNormalTx(hash *types.Hash)
func (*SerialExecutor) ApplyTransactions ¶ added in v1.0.1
func (se *SerialExecutor) ApplyTransactions(txs []*pb.Transaction) []*pb.Receipt
func (*SerialExecutor) GetBoltContracts ¶ added in v1.0.1
func (se *SerialExecutor) GetBoltContracts() map[string]agency.Contract
func (*SerialExecutor) GetInterchainCounter ¶ added in v1.0.1
func (se *SerialExecutor) GetInterchainCounter() map[string][]uint64
func (*SerialExecutor) GetNormalTxs ¶ added in v1.0.1
func (se *SerialExecutor) GetNormalTxs() []*types.Hash
Click to show internal directories.
Click to hide internal directories.