From 8aa993da5bce11ae9772942bfc61c799a37796bc Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Wed, 16 May 2018 13:07:49 -0400 Subject: [PATCH] sharding: fix broken tests Former-commit-id: 22b585bd87ebb8c63808c59d0ca249d891b100c3 [formerly 1de60c6c145e96f61cbdd2d969632e2f0732568a] Former-commit-id: 57769a0dbc37ced79e98b2c7c418bdf6ade49f93 --- sharding/shard_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sharding/shard_test.go b/sharding/shard_test.go index cd3d90af5..710c4e488 100644 --- a/sharding/shard_test.go +++ b/sharding/shard_test.go @@ -109,8 +109,6 @@ func TestShard_CollationByHash(t *testing.T) { shardDB := database.NewShardKV() shard := NewShard(big.NewInt(1), shardDB) - hash := collation.Header().Hash() - // should throw error if saving the collation before setting the chunk root // in header. if err := shard.SaveCollation(collation); err == nil { @@ -120,6 +118,8 @@ func TestShard_CollationByHash(t *testing.T) { // we set the chunk root. collation.CalculateChunkRoot() + hash := collation.Header().Hash() + // calculate a new hash now that chunk root is set. newHash := collation.Header().Hash()