MCPcopy Create free account
hub / github.com/33cn/chain33 / GetTxList

Method GetTxList

client/queueprotocol.go:169–184  ·  view source on GitHub ↗

GetTxList get transactions from mempool

(param *types.TxHashList)

Source from the content-addressed store, hash-verified

167
168// GetTxList get transactions from mempool
169func (q *QueueProtocol) GetTxList(param *types.TxHashList) (*types.ReplyTxList, error) {
170 if param == nil {
171 err := types.ErrInvalidParam
172 log.Error("GetTxList", "Error", err)
173 return nil, err
174 }
175 msg, err := q.send(mempoolKey, types.EventTxList, param)
176 if err != nil {
177 log.Error("GetTxList", "Error", err.Error())
178 return nil, err
179 }
180 if reply, ok := msg.GetData().(*types.ReplyTxList); ok {
181 return reply, nil
182 }
183 return nil, types.ErrTypeAsset
184}
185
186//GetTxListByAddr get transactions by addr from mempool
187func (q *QueueProtocol) GetTxListByAddr(param *types.ReqAddrs) (*types.TransactionDetails, error) {

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
ErrorMethod · 0.65
GetDataMethod · 0.65

Tested by

no test coverage detected