Documentation ¶
Index ¶
- func DisableLog()
- func SetLogLevel(level string)
- type Item
- type Mempool
- func (mem *Mempool) BlockTime() int64
- func (mem *Mempool) CheckExpireValid(msg queue.Message) (bool, error)
- func (mem *Mempool) CheckTxs(msg queue.Message) queue.Message
- func (mem *Mempool) Close()
- func (mem *Mempool) DelBlock(block *types.Block)
- func (mem *Mempool) GetAccTxs(addrs *types.ReqAddrs) *types.TransactionDetails
- func (mem *Mempool) GetHeader() *types.Header
- func (mem *Mempool) GetLastHeader() (interface{}, error)
- func (mem *Mempool) GetLatestTx() []*types.Transaction
- func (mem *Mempool) GetMinFee() int64
- func (mem *Mempool) GetTxList(hashList *types.TxHashList) []*types.Transaction
- func (mem *Mempool) Height() int64
- func (mem *Mempool) PushTx(tx *types.Transaction) error
- func (mem *Mempool) ReTry()
- func (mem *Mempool) ReTrySend()
- func (mem *Mempool) RemoveBlockedTxs()
- func (mem *Mempool) RemoveExpiredAndDuplicateMempoolTxs() []*types.Transaction
- func (mem *Mempool) RemoveTxs(hashList *types.TxHashList) error
- func (mem *Mempool) RemoveTxsOfBlock(block *types.Block) bool
- func (mem *Mempool) Resize(size int)
- func (mem *Mempool) SendTxToP2P(tx *types.Transaction)
- func (mem *Mempool) SetMinFee(fee int64)
- func (mem *Mempool) SetQueueClient(client queue.Client)
- func (mem *Mempool) SetSync(status bool)
- func (mem *Mempool) Size() int
- func (mem *Mempool) TxNumOfAccount(addr string) int64
- func (mem *Mempool) WaitPollLastHeader()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mempool ¶
type Mempool struct {
// contains filtered or unexported fields
}
Mempool mempool module
func (*Mempool) CheckExpireValid ¶
CheckExpireValid 检查交易过期有效性,过期返回false,未过期返回true
func (*Mempool) GetAccTxs ¶
func (mem *Mempool) GetAccTxs(addrs *types.ReqAddrs) *types.TransactionDetails
GetAccTxs 用来获取对应账户地址(列表)中的全部交易详细信息
func (*Mempool) GetLastHeader ¶
GetLastHeader 获取LastHeader的height和blockTime
func (*Mempool) GetLatestTx ¶
func (mem *Mempool) GetLatestTx() []*types.Transaction
GetLatestTx 返回最新十条加入到Mempool的交易
func (*Mempool) GetTxList ¶
func (mem *Mempool) GetTxList(hashList *types.TxHashList) []*types.Transaction
GetTxList 从txCache中返回给定数目的tx
func (*Mempool) PushTx ¶
func (mem *Mempool) PushTx(tx *types.Transaction) error
PushTx 将交易推入Mempool,并返回结果(error)
func (*Mempool) RemoveBlockedTxs ¶
func (mem *Mempool) RemoveBlockedTxs()
RemoveBlockedTxs 每隔1分钟清理一次已打包的交易
func (*Mempool) RemoveExpiredAndDuplicateMempoolTxs ¶
func (mem *Mempool) RemoveExpiredAndDuplicateMempoolTxs() []*types.Transaction
RemoveExpiredAndDuplicateMempoolTxs 删除过期交易然后复制并返回Mempool内交易
func (*Mempool) RemoveTxs ¶
func (mem *Mempool) RemoveTxs(hashList *types.TxHashList) error
RemoveTxs 从Mempool中删除给定Hash的txs
func (*Mempool) RemoveTxsOfBlock ¶
RemoveTxsOfBlock 移除Mempool中已被Blockchain打包的tx
func (*Mempool) SendTxToP2P ¶
func (mem *Mempool) SendTxToP2P(tx *types.Transaction)
SendTxToP2P 向"p2p"发送消息
func (*Mempool) SetQueueClient ¶
SetQueueClient set client queue, for recv msg
func (*Mempool) TxNumOfAccount ¶
TxNumOfAccount 返回账户在Mempool中交易数量
func (*Mempool) WaitPollLastHeader ¶
func (mem *Mempool) WaitPollLastHeader()
WaitPollLastHeader 等待获取到最新高度
Click to show internal directories.
Click to hide internal directories.