GetTransactionByAddr get transaction by address
(param *types.ReqAddr)
| 261 | |
| 262 | // GetTransactionByAddr get transaction by address |
| 263 | func (q *QueueProtocol) GetTransactionByAddr(param *types.ReqAddr) (*types.ReplyTxInfos, error) { |
| 264 | if param == nil { |
| 265 | err := types.ErrInvalidParam |
| 266 | log.Error("GetTransactionByAddr", "Error", err) |
| 267 | return nil, err |
| 268 | } |
| 269 | msg, err := q.send(blockchainKey, types.EventGetTransactionByAddr, param) |
| 270 | if err != nil { |
| 271 | log.Error("GetTransactionByAddr", "Error", err.Error()) |
| 272 | return nil, err |
| 273 | } |
| 274 | if reply, ok := msg.GetData().(*types.ReplyTxInfos); ok { |
| 275 | return reply, nil |
| 276 | } |
| 277 | err = types.ErrTypeAsset |
| 278 | log.Error("GetTransactionByAddr", "Error", err) |
| 279 | return nil, types.ErrTypeAsset |
| 280 | } |
| 281 | |
| 282 | // GetTransactionByHash get transactions by hash from blockchain |
| 283 | func (q *QueueProtocol) GetTransactionByHash(param *types.ReqHashes) (*types.TransactionDetails, error) { |