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

Function testQueryTx

client/queueprotocol_test.go:509–522  ·  view source on GitHub ↗
(t *testing.T, api client.QueueProtocolAPI)

Source from the content-addressed store, hash-verified

507}
508
509func testQueryTx(t *testing.T, api client.QueueProtocolAPI) {
510 _, err := api.QueryTx(&types.ReqHash{})
511 if err != nil {
512 t.Error("Call QueryTx Failed.", err)
513 }
514 _, err = api.QueryTx(nil)
515 if err == nil {
516 t.Error("QueryTx(nil) need return error.")
517 }
518 _, err = api.QueryTx(&types.ReqHash{Hash: []byte("case1")})
519 if err == nil {
520 t.Error("QueryTx(&ReqHash{Hash:[]byte(\"case1\")}) need return error.")
521 }
522}
523
524func testGetTransactionByAddr(t *testing.T, api client.QueueProtocolAPI) {
525 _, err := api.GetTransactionByAddr(&types.ReqAddr{})

Callers 1

TestQueueProtocolFunction · 0.85

Calls 2

QueryTxMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected