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

Method GetMempool

client/queueprotocol.go:301–311  ·  view source on GitHub ↗

GetMempool get transactions from mempool

(req *types.ReqGetMempool)

Source from the content-addressed store, hash-verified

299
300// GetMempool get transactions from mempool
301func (q *QueueProtocol) GetMempool(req *types.ReqGetMempool) (*types.ReplyTxList, error) {
302 msg, err := q.send(mempoolKey, types.EventGetMempool, req)
303 if err != nil {
304 log.Error("GetMempool", "Error", err.Error())
305 return nil, err
306 }
307 if reply, ok := msg.GetData().(*types.ReplyTxList); ok {
308 return reply, nil
309 }
310 return nil, types.ErrTypeAsset
311}
312
313// PeerInfo query peer list
314func (q *QueueProtocol) PeerInfo(req *types.P2PGetPeerReq) (*types.PeerList, error) {

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
ErrorMethod · 0.65
GetDataMethod · 0.65

Tested by

no test coverage detected