GetTxList get transactions from mempool
(param *types.TxHashList)
| 167 | |
| 168 | // GetTxList get transactions from mempool |
| 169 | func (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 |
| 187 | func (q *QueueProtocol) GetTxListByAddr(param *types.ReqAddrs) (*types.TransactionDetails, error) { |