Documentation ¶
Index ¶
- Constants
- type EnumTxCategory
- type GreylistParams
- type PendingBlockMode
- type ProducerPlugin
- func (p *ProducerPlugin) AddGreylistAccounts(params GreylistParams)
- func (p *ProducerPlugin) GetGreylist() GreylistParams
- func (p *ProducerPlugin) GetRuntimeOptions() RuntimeOptions
- func (p *ProducerPlugin) GetWhitelistBlacklist() WhitelistAndBlacklist
- func (p *ProducerPlugin) IsProducerKey(key ecc.PublicKey) bool
- func (p *ProducerPlugin) Pause()
- func (p *ProducerPlugin) Paused() bool
- func (p *ProducerPlugin) PluginInitialize(c *cli.Context)
- func (p *ProducerPlugin) PluginShutdown()
- func (p *ProducerPlugin) PluginStartup()
- func (p *ProducerPlugin) RemoveGreylistAccounts(params GreylistParams)
- func (p *ProducerPlugin) Resume()
- func (p *ProducerPlugin) SetProgramOptions(options *[]cli.Flag)
- func (p *ProducerPlugin) SetWhitelistBlacklist(params WhitelistAndBlacklist)
- func (p *ProducerPlugin) SignCompact(key *ecc.PublicKey, digest crypto.Sha256) *ecc.Signature
- func (p *ProducerPlugin) UpdateRuntimeOptions(options RuntimeOptions)
- type ProducerPluginImpl
- func (impl *ProducerPluginImpl) CalculateNextBlockTime(producerName common.AccountName, currentBlockTime types.BlockTimeStamp) *common.TimePoint
- func (impl *ProducerPluginImpl) CalculatePendingBlockTime() common.TimePoint
- func (impl *ProducerPluginImpl) GetIrreversibleBlockAge() common.Microseconds
- func (impl *ProducerPluginImpl) MaybeProduceBlock() bool
- func (impl *ProducerPluginImpl) OnBlock(bsp *types.BlockState)
- func (impl *ProducerPluginImpl) OnIncomingBlock(block *types.SignedBlock)
- func (impl *ProducerPluginImpl) OnIncomingTransactionAsync(trx *types.PackedTransaction, persistUntilExpired bool, next func(interface{}))
- func (impl *ProducerPluginImpl) OnIrreversibleBlock(lib *types.SignedBlock)
- func (impl *ProducerPluginImpl) ProduceBlock()
- func (impl *ProducerPluginImpl) ProductionDisabledByPolicy() bool
- func (impl *ProducerPluginImpl) ScheduleDelayedProductionLoop(currentBlockTime types.BlockTimeStamp)
- func (impl *ProducerPluginImpl) ScheduleProductionLoop()
- func (impl *ProducerPluginImpl) StartBlock() (StartBlockResult, bool)
- type RuntimeOptions
- type StartBlockResult
- type WhitelistAndBlacklist
- type WhitelistAndBlacklistParam
Constants ¶
View Source
const ( PERSISTED = EnumTxCategory(iota) UNEXPIRED_UNPERSISTED EXPIRED )
View Source
const ProducerPlug = PluginTypeName("ProducerPlugin")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnumTxCategory ¶
type EnumTxCategory int
type GreylistParams ¶
type GreylistParams struct {
Accounts []common.AccountName
}
type PendingBlockMode ¶
type PendingBlockMode int
type ProducerPlugin ¶
type ProducerPlugin struct { AbstractPlugin // contains filtered or unexported fields }
func NewProducerPlugin ¶
func NewProducerPlugin(io *asio.IoContext) *ProducerPlugin
func (*ProducerPlugin) AddGreylistAccounts ¶
func (p *ProducerPlugin) AddGreylistAccounts(params GreylistParams)
func (*ProducerPlugin) GetGreylist ¶
func (p *ProducerPlugin) GetGreylist() GreylistParams
func (*ProducerPlugin) GetRuntimeOptions ¶
func (p *ProducerPlugin) GetRuntimeOptions() RuntimeOptions
func (*ProducerPlugin) GetWhitelistBlacklist ¶
func (p *ProducerPlugin) GetWhitelistBlacklist() WhitelistAndBlacklist
func (*ProducerPlugin) IsProducerKey ¶
func (p *ProducerPlugin) IsProducerKey(key ecc.PublicKey) bool
func (*ProducerPlugin) Pause ¶
func (p *ProducerPlugin) Pause()
func (*ProducerPlugin) Paused ¶
func (p *ProducerPlugin) Paused() bool
func (*ProducerPlugin) PluginInitialize ¶
func (p *ProducerPlugin) PluginInitialize(c *cli.Context)
func (*ProducerPlugin) PluginShutdown ¶
func (p *ProducerPlugin) PluginShutdown()
func (*ProducerPlugin) PluginStartup ¶
func (p *ProducerPlugin) PluginStartup()
func (*ProducerPlugin) RemoveGreylistAccounts ¶
func (p *ProducerPlugin) RemoveGreylistAccounts(params GreylistParams)
func (*ProducerPlugin) Resume ¶
func (p *ProducerPlugin) Resume()
func (*ProducerPlugin) SetProgramOptions ¶
func (p *ProducerPlugin) SetProgramOptions(options *[]cli.Flag)
func (*ProducerPlugin) SetWhitelistBlacklist ¶
func (p *ProducerPlugin) SetWhitelistBlacklist(params WhitelistAndBlacklist)
func (*ProducerPlugin) SignCompact ¶
func (*ProducerPlugin) UpdateRuntimeOptions ¶
func (p *ProducerPlugin) UpdateRuntimeOptions(options RuntimeOptions)
type ProducerPluginImpl ¶
type ProducerPluginImpl struct { Chain *chain.Controller ProductionEnabled bool ProductionPaused bool ProductionSkipFlags uint32 SignatureProviders map[ecc.PublicKey]signatureProviderType Producers AccountNameSet Timer *common.Timer ProducerWatermarks map[common.AccountName]uint32 PendingBlockMode PendingBlockMode PersistentTransactions *TransactionIdWithExpiryIndex BlacklistedTransactions *TransactionIdWithExpiryIndex MaxTransactionTimeMs int32 MaxIrreversibleBlockAgeUs common.Microseconds ProduceTimeOffsetUs int32 LastBlockTimeOffsetUs int32 IrreversibleBlockTime common.TimePoint KeosdProviderTimeoutUs common.Microseconds LastSignedBlockTime common.TimePoint StartTime common.TimePoint LastSignedBlockNum uint32 Self *ProducerPlugin PendingIncomingTransactions []pendingIncomingTransaction // keep a expected ratio between defer txn and incoming txn IncomingTrxWeight float64 IncomingDeferRadio float64 TransactionAckChannel *include.Channel // contains filtered or unexported fields }
func NewProducerPluginImpl ¶
func NewProducerPluginImpl(io *asio.IoContext) *ProducerPluginImpl
func (*ProducerPluginImpl) CalculateNextBlockTime ¶
func (impl *ProducerPluginImpl) CalculateNextBlockTime(producerName common.AccountName, currentBlockTime types.BlockTimeStamp) *common.TimePoint
func (*ProducerPluginImpl) CalculatePendingBlockTime ¶
func (impl *ProducerPluginImpl) CalculatePendingBlockTime() common.TimePoint
func (*ProducerPluginImpl) GetIrreversibleBlockAge ¶
func (impl *ProducerPluginImpl) GetIrreversibleBlockAge() common.Microseconds
func (*ProducerPluginImpl) MaybeProduceBlock ¶
func (impl *ProducerPluginImpl) MaybeProduceBlock() bool
func (*ProducerPluginImpl) OnBlock ¶
func (impl *ProducerPluginImpl) OnBlock(bsp *types.BlockState)
func (*ProducerPluginImpl) OnIncomingBlock ¶
func (impl *ProducerPluginImpl) OnIncomingBlock(block *types.SignedBlock)
func (*ProducerPluginImpl) OnIncomingTransactionAsync ¶
func (impl *ProducerPluginImpl) OnIncomingTransactionAsync(trx *types.PackedTransaction, persistUntilExpired bool, next func(interface{}))
func (*ProducerPluginImpl) OnIrreversibleBlock ¶
func (impl *ProducerPluginImpl) OnIrreversibleBlock(lib *types.SignedBlock)
func (*ProducerPluginImpl) ProduceBlock ¶
func (impl *ProducerPluginImpl) ProduceBlock()
func (*ProducerPluginImpl) ProductionDisabledByPolicy ¶
func (impl *ProducerPluginImpl) ProductionDisabledByPolicy() bool
func (*ProducerPluginImpl) ScheduleDelayedProductionLoop ¶
func (impl *ProducerPluginImpl) ScheduleDelayedProductionLoop(currentBlockTime types.BlockTimeStamp)
func (*ProducerPluginImpl) ScheduleProductionLoop ¶
func (impl *ProducerPluginImpl) ScheduleProductionLoop()
func (*ProducerPluginImpl) StartBlock ¶
func (impl *ProducerPluginImpl) StartBlock() (StartBlockResult, bool)
type RuntimeOptions ¶
type StartBlockResult ¶
type StartBlockResult int
type WhitelistAndBlacklist ¶
type WhitelistAndBlacklist struct { ActorWhitelist *AccountNameSet ActorBlacklist *AccountNameSet ContractWhitelist *AccountNameSet ContractBlacklist *AccountNameSet ActionBlacklist *NamePairSet KeyBlacklist *PublicKeySet }
type WhitelistAndBlacklistParam ¶
type WhitelistAndBlacklistParam struct { ActorWhitelist []common.AccountName ActorBlacklist []common.AccountName ContractWhitelist []common.AccountName ContractBlacklist []common.AccountName ActionBlacklist []common.NamePair KeyBlacklist []string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.