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

Function testGetBlockHash

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

Source from the content-addressed store, hash-verified

394}
395
396func testGetBlockHash(t *testing.T, api client.QueueProtocolAPI) {
397 _, err := api.GetBlockHash(&types.ReqInt{})
398 if err != nil {
399 t.Error("Call GetBlockHash Failed.", err)
400 }
401 _, err = api.GetBlockHash(nil)
402 if err == nil {
403 t.Error("GetBlockHash(nil) need return error.")
404 }
405 _, err = api.GetBlockHash(&types.ReqInt{Height: 10})
406 if err == nil {
407 t.Error("GetBlockHash(&types.ReqInt{Height:10}) need return error.")
408 }
409}
410
411func testGetAddrOverview(t *testing.T, api client.QueueProtocolAPI) {
412 _, err := api.GetAddrOverview(&types.ReqAddr{})

Callers 1

TestQueueProtocolFunction · 0.85

Calls 2

GetBlockHashMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected