From edeb359dedad0ec1f5baf536913e7ec759075258 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Wed, 10 Jun 2020 10:51:06 -0700 Subject: [PATCH] Use SSZ HTR as baseline (#6207) * Use ssz htr as baseline to compare * Merge branch 'master' into fix-test * One more. Fix for TestBlockBodyRoot_NilIsSameAsEmpty * Merge branch 'fix-test' of github.com:prysmaticlabs/prysm into fix-test --- beacon-chain/state/stateutil/blocks_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/beacon-chain/state/stateutil/blocks_test.go b/beacon-chain/state/stateutil/blocks_test.go index 6b2fa3878..c6837ba7b 100644 --- a/beacon-chain/state/stateutil/blocks_test.go +++ b/beacon-chain/state/stateutil/blocks_test.go @@ -4,6 +4,7 @@ import ( "testing" ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" + "github.com/prysmaticlabs/go-ssz" "github.com/prysmaticlabs/prysm/beacon-chain/state/stateutil" "github.com/prysmaticlabs/prysm/shared/testutil" ) @@ -14,7 +15,7 @@ func TestBlockRoot(t *testing.T) { if err != nil { t.Fatal(err) } - expectedRoot, err := stateutil.BlockRoot(blk.Block) + expectedRoot, err := ssz.HashTreeRoot(blk.Block) if err != nil { t.Fatal(err) } @@ -29,7 +30,7 @@ func TestBlockRoot(t *testing.T) { if err != nil { t.Fatal(err) } - expectedRoot, err = stateutil.BlockRoot(blk.Block) + expectedRoot, err = ssz.HashTreeRoot(blk.Block) if err != nil { t.Fatal(err) } @@ -43,7 +44,7 @@ func TestBlockRoot(t *testing.T) { } func TestBlockBodyRoot_NilIsSameAsEmpty(t *testing.T) { - a, err := stateutil.BlockBodyRoot(ðpb.BeaconBlockBody{}) + a, err := ssz.HashTreeRoot(ðpb.BeaconBlockBody{}) if err != nil { t.Error(err) }