From 891f63fb5c7f44c8cf79d7ba926e244d3a3f6b19 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Tue, 13 Sep 2022 15:33:24 -0500 Subject: [PATCH] Update jsonrpc_blockchain_tests.go for new sample data. --- server/jsonrpc_blockchain_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/jsonrpc_blockchain_test.go b/server/jsonrpc_blockchain_test.go index 39221a8..a57bc35 100644 --- a/server/jsonrpc_blockchain_test.go +++ b/server/jsonrpc_blockchain_test.go @@ -2,6 +2,7 @@ package server import ( "encoding/json" + "strconv" "testing" "github.com/lbryio/herald.go/db" @@ -10,6 +11,7 @@ import ( // Source: test_variety_of_transactions_and_longish_history (lbry-sdk/tests/integration/transactions) const regTestDBPath = "../testdata/test_variety_of_transactions/lbry-rocksdb" +const regTestHeight = 502 var regTestAddrs = [30]string{ "mtgiQkd35xpx3TaZ4RBNirf3uSMQ8tXQ7z", @@ -72,7 +74,7 @@ func TestServerGetHeight(t *testing.T) { t.Errorf("unmarshal err: %v", err) } t.Logf("resp: %v", string(marshalled)) - if string(marshalled) != "500" { + if string(marshalled) != strconv.FormatInt(regTestHeight, 10) { t.Errorf("bad height: %v", string(marshalled)) } } @@ -109,7 +111,7 @@ func TestGetChunk(t *testing.T) { t.Errorf("index: %v bad length: %v", index, len(*resp)) } case 5: - if len(*resp) != 21*112*2 { + if len(*resp) != 23*112*2 { t.Errorf("index: %v bad length: %v", index, len(*resp)) } default: