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
This commit is contained in:
terence tsao 2020-06-10 10:51:06 -07:00 committed by GitHub
parent f40a7575de
commit edeb359ded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(&ethpb.BeaconBlockBody{})
a, err := ssz.HashTreeRoot(&ethpb.BeaconBlockBody{})
if err != nil {
t.Error(err)
}