diff options
author | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-05-21 20:31:09 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-06-21 19:46:54 +0200 |
commit | 8d097316c0a12f14de4b9e27e1fe4c458c32f4b0 (patch) | |
tree | 84ff3998b167bb5e12f26842ddff2c565c7a86bb /pkg/types/proof_test.go | |
parent | 97540f9ded30f68f9fda62f66f3006414cbfd5b7 (diff) |
use hashing from merkle package
Diffstat (limited to 'pkg/types/proof_test.go')
-rw-r--r-- | pkg/types/proof_test.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pkg/types/proof_test.go b/pkg/types/proof_test.go index 8285b6e..ff3f177 100644 --- a/pkg/types/proof_test.go +++ b/pkg/types/proof_test.go @@ -6,6 +6,8 @@ import ( "io" "reflect" "testing" + + "git.sigsum.org/sigsum-go/pkg/merkle" ) func TestInclusionProofToASCII(t *testing.T) { @@ -101,8 +103,8 @@ func validInclusionProof(t *testing.T) *InclusionProof { return &InclusionProof{ LeafIndex: 1, TreeSize: 4, - Path: []Hash{ - Hash{}, + Path: []merkle.Hash{ + merkle.Hash{}, *newHashBufferInc(t), }, } @@ -112,7 +114,7 @@ func validInclusionProofASCII(t *testing.T) string { t.Helper() return fmt.Sprintf("%s=%d\n%s=%x\n%s=%x\n", "leaf_index", 1, - "inclusion_path", Hash{}, + "inclusion_path", merkle.Hash{}, "inclusion_path", newHashBufferInc(t)[:], ) } @@ -122,8 +124,8 @@ func validConsistencyProof(t *testing.T) *ConsistencyProof { return &ConsistencyProof{ NewSize: 1, OldSize: 4, - Path: []Hash{ - Hash{}, + Path: []merkle.Hash{ + merkle.Hash{}, *newHashBufferInc(t), }, } @@ -132,7 +134,7 @@ func validConsistencyProof(t *testing.T) *ConsistencyProof { func validConsistencyProofASCII(t *testing.T) string { t.Helper() return fmt.Sprintf("%s=%x\n%s=%x\n", - "consistency_path", Hash{}, + "consistency_path", merkle.Hash{}, "consistency_path", newHashBufferInc(t)[:], ) } |