Documentation ¶
Index ¶
- type NonceList
- type TransactionDict
- type TxPool
- func (pool *TxPool) GetTx(hash []byte) *userevent.Transaction
- func (pool *TxPool) GetUserTxs(address string) *UserTxs
- func (pool *TxPool) Notify(txs []userevent.Transaction)
- func (pool *TxPool) Park(tx *userevent.Transaction, userNonce int64)
- func (pool *TxPool) Pop(size int) []*userevent.Transaction
- func (pool *TxPool) Promote(statdb MPTPlus.MTP)
- type TxTimedList
- type UserTxs
- type UsersTxs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionDict ¶
type TransactionDict struct { All map[string]*userevent.Transaction `json:"all"` // contains filtered or unexported fields }
func NewTransactionDict ¶
func NewTransactionDict() *TransactionDict
func (*TransactionDict) Delete ¶
func (dict *TransactionDict) Delete(hash string)
func (*TransactionDict) Get ¶
func (dict *TransactionDict) Get(hash string) *userevent.Transaction
func (TransactionDict) Range ¶
func (dict TransactionDict) Range(f func(hash string, tx *userevent.Transaction) bool)
func (*TransactionDict) Save ¶
func (dict *TransactionDict) Save(tx *userevent.Transaction)
type TxPool ¶
type TxPool struct { All *TransactionDict `json:"All"` List *TxTimedList `json:"timedList"` UsersTxs *UsersTxs `json:"userTxs"` }
func (*TxPool) GetUserTxs ¶
func (*TxPool) Notify ¶
func (pool *TxPool) Notify(txs []userevent.Transaction)
type TxTimedList ¶
type TxTimedList struct { List []*userevent.Transaction `json:"List"` M map[string]bool `json:"M"` // contains filtered or unexported fields }
func NewTimedList ¶
func NewTimedList() *TxTimedList
func (*TxTimedList) Notify ¶
func (list *TxTimedList) Notify(tx userevent.Transaction)
func (*TxTimedList) Pop ¶
func (list *TxTimedList) Pop(size int) []*userevent.Transaction
func (*TxTimedList) Put ¶
func (list *TxTimedList) Put(txs ...*userevent.Transaction)
type UserTxs ¶
type UserTxs struct { Txs map[int64]*userevent.Transaction `json:"txs"` Nonces *NonceList `json:"nonces"` Nonce int64 `json:"nonce"` Index int `json:"index"` }
func NewUserTxs ¶
func (*UserTxs) Remove ¶
func (sorted *UserTxs) Remove(tx userevent.Transaction)
func (*UserTxs) Save ¶
func (sorted *UserTxs) Save(tx *userevent.Transaction) ([]*userevent.Transaction, bool)
type UsersTxs ¶
func NewUsersTxs ¶
func NewUsersTxs() *UsersTxs
func (*UsersTxs) Notify ¶
func (m *UsersTxs) Notify(tx userevent.Transaction) ([]*userevent.Transaction, bool)
func (*UsersTxs) SaveTx ¶
func (m *UsersTxs) SaveTx(tx *userevent.Transaction, userNonce int64) ([]*userevent.Transaction, bool)
Click to show internal directories.
Click to hide internal directories.