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

Method GetTransactionByAddr

client/queueprotocol.go:263–280  ·  view source on GitHub ↗

GetTransactionByAddr get transaction by address

(param *types.ReqAddr)

Source from the content-addressed store, hash-verified

261
262// GetTransactionByAddr get transaction by address
263func (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
283func (q *QueueProtocol) GetTransactionByHash(param *types.ReqHashes) (*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