Documentation ¶
Index ¶
- Constants
- 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) GetBoltContracts() map[string]agency.Contract
- func (exec *BlockExecutor) Start() error
- func (exec *BlockExecutor) Stop() error
- func (exec *BlockExecutor) SubscribeBlockEvent(ch chan<- events.ExecutedEvent) event.Subscription
- func (exec *BlockExecutor) SubscribeLogsEvent(ch chan<- []*pb.EvmLog) event.Subscription
- func (exec *BlockExecutor) SubscribeNodeEvent(ch chan<- events.NodeEvent) event.Subscription
- type BlockWrapper
- type Executor
- type SerialExecutor
- func (se *SerialExecutor) AddInterchainCounter(to string, index *pb.VerifiedIndex)
- func (se *SerialExecutor) AddNormalTx(hash *types.Hash)
- func (se *SerialExecutor) ApplyTransactions(txs []pb.Transaction, invalidTxs map[int]agency.InvalidReason) []*pb.Receipt
- func (se *SerialExecutor) GetBoltContracts() map[string]agency.Contract
- func (se *SerialExecutor) GetDescription() string
- func (se *SerialExecutor) GetInterchainCounter() map[string][]*pb.VerifiedIndex
- func (se *SerialExecutor) GetNormalTxs() []*types.Hash
Constants ¶
View Source
const ( GasNormalTx = 21000 GasFailedTx = 21000 GasBVMTx = 21000 * 10 )
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, client *appchain.Client, config *repo.Config, gasPrice *big.Int) (*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) GetBoltContracts ¶ added in v1.10.0
func (exec *BlockExecutor) GetBoltContracts() map[string]agency.Contract
func (*BlockExecutor) SubscribeBlockEvent ¶
func (exec *BlockExecutor) SubscribeBlockEvent(ch chan<- events.ExecutedEvent) event.Subscription
SubscribeBlockEvent registers a subscription of ExecutedEvent.
func (*BlockExecutor) SubscribeLogsEvent ¶ added in v1.8.0
func (exec *BlockExecutor) SubscribeLogsEvent(ch chan<- []*pb.EvmLog) event.Subscription
func (*BlockExecutor) SubscribeNodeEvent ¶ added in v1.10.0
func (exec *BlockExecutor) SubscribeNodeEvent(ch chan<- events.NodeEvent) event.Subscription
type BlockWrapper ¶ added in v1.8.0
type BlockWrapper struct {
// contains filtered or unexported fields
}
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 // SubscribeLogEvent SubscribeLogsEvent(chan<- []*pb.EvmLog) event.Subscription // SubscribeNodeEvent SubscribeNodeEvent(chan<- events.NodeEvent) event.Subscription GetBoltContracts() map[string]agency.Contract }
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 *pb.VerifiedIndex)
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, invalidTxs map[int]agency.InvalidReason) []*pb.Receipt
func (*SerialExecutor) GetBoltContracts ¶ added in v1.0.1
func (se *SerialExecutor) GetBoltContracts() map[string]agency.Contract
func (*SerialExecutor) GetDescription ¶ added in v1.8.0
func (se *SerialExecutor) GetDescription() string
func (*SerialExecutor) GetInterchainCounter ¶ added in v1.0.1
func (se *SerialExecutor) GetInterchainCounter() map[string][]*pb.VerifiedIndex
func (*SerialExecutor) GetNormalTxs ¶ added in v1.0.1
func (se *SerialExecutor) GetNormalTxs() []*types.Hash
Click to show internal directories.
Click to hide internal directories.