From ebbc346c87bcac5783e58e7f2743600177470b94 Mon Sep 17 00:00:00 2001 From: Larry Ruane Date: Mon, 26 Jul 2021 23:14:05 -0600 Subject: [PATCH] added unit test --- .gitignore | 1 + frontend/frontend_test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index e3d8393..a93329e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ lwd-api.html *.orig __debug_bin .vscode +frontend/unittestcache/ diff --git a/frontend/frontend_test.go b/frontend/frontend_test.go index ccc8851..65a2c26 100644 --- a/frontend/frontend_test.go +++ b/frontend/frontend_test.go @@ -191,6 +191,9 @@ func TestGetLatestBlock(t *testing.T) { if blockID.Height != 380640 { t.Fatal("unexpected blockID.height") } + if string(blockID.Hash) != string(block.Hash) { + t.Fatal("unexpected blockID.hash") + } step = 0 }