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

Function testGetBlockOverview

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

Source from the content-addressed store, hash-verified

424}
425
426func testGetBlockOverview(t *testing.T, api client.QueueProtocolAPI) {
427 _, err := api.GetBlockOverview(&types.ReqHash{})
428 if err != nil {
429 t.Error("Call GetBlockOverview Failed.", err)
430 }
431 _, err = api.GetBlockOverview(nil)
432 if err == nil {
433 t.Error("GetBlockOverview(nil) need return error.")
434 }
435 _, err = api.GetBlockOverview(&types.ReqHash{Hash: []byte("case1")})
436 if err == nil {
437 t.Error("GetBlockOverview(&types.ReqHash{Hash:[]byte(\"case1\")}) need return error.")
438 }
439}
440
441func testGetLastMempool(t *testing.T, api client.QueueProtocolAPI) {
442 _, err := api.GetLastMempool()

Callers 1

TestQueueProtocolFunction · 0.85

Calls 2

GetBlockOverviewMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected