Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateProcessor ¶
type StateProcessor struct {
// contains filtered or unexported fields
}
StateProcessor is a basic Processor, which takes care of transitioning state from one point to another.
func NewStateProcessor ¶
func NewStateProcessor(bc *blockchain.BlockChain, engine consensus.Engine) *StateProcessor
NewStateProcessor initialises a new StateProcessor.
type TxPool ¶
type TxPool struct {
// contains filtered or unexported fields
}
TxPool contains all currently known transactions. Transactions enter the pool when they are received from the network or submitted locally. They exit the pool when they are included in the blockchain.
The pool separates processable transactions (which can be applied to the current state) and future transactions. Transactions move between those two states over time as they are received and processed.
func NewTxPool ¶
func NewTxPool(config TxPoolConfig, chain blockChain) *TxPool
NewTxPool creates a new transaction pool to gather, sort and filter inbound transactions from the network.
func (*TxPool) AddRemotes ¶
func (pool *TxPool) AddRemotes([]*types.Transaction) []error
func (*TxPool) SubscribeNewTxsEvent ¶
func (pool *TxPool) SubscribeNewTxsEvent(chan<- core.NewTxsEvent) event.Subscription
type TxPoolConfig ¶
type TxPoolConfig struct {
NoLocals bool // Whether local transaction handling should be disabled
Journal string // Journal of local transactions to survive node restarts
Rejournal time.Duration // Time interval to regenerate the local transaction journal
PriceLimit uint64 // Minimum price to enforce for acceptance into the pool
AccountSlots uint64 // Number of executable transaction slots guaranteed per account
GlobalSlots uint64 // Maximum number of executable transaction slots for all accounts
AccountQueue uint64 // Maximum number of non-executable transaction slots permitted per account
GlobalQueue uint64 // Maximum number of non-executable transaction slots for all accounts
Lifetime time.Duration // Maximum amount of time non-executable transaction are queued
}
TxPoolConfig are the configuration parameters of the transaction pool.