From 1224f565a27155c3abef3ecf4d86cf6f472b1374 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sat, 21 May 2022 20:32:17 +0200 Subject: pick-up merkle package TODO(ln5): upgrade sigsum-go dependency in go.mod file --- pkg/instance/instance.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/instance/instance.go') diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 7f84bbb..35e24f7 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -10,6 +10,7 @@ import ( "git.sigsum.org/log-go/pkg/db" "git.sigsum.org/log-go/pkg/state" "git.sigsum.org/sigsum-go/pkg/dns" + "git.sigsum.org/sigsum-go/pkg/merkle" "git.sigsum.org/sigsum-go/pkg/requests" "git.sigsum.org/sigsum-go/pkg/types" ) @@ -25,7 +26,7 @@ type Config struct { ShardStart uint64 // Shard interval start (num seconds since UNIX epoch) // Witnesses map trusted witness identifiers to public keys - Witnesses map[types.Hash]types.PublicKey + Witnesses map[merkle.Hash]types.PublicKey } // Instance is an instance of the log's front-end @@ -63,7 +64,7 @@ func (i *Instance) leafRequestFromHTTP(ctx context.Context, r *http.Request) (*r } stmt := types.Statement{ ShardHint: req.ShardHint, - Checksum: *types.HashFn(req.Message[:]), + Checksum: *merkle.HashFn(req.Message[:]), } if !stmt.Verify(&req.PublicKey, &req.Signature) { return nil, fmt.Errorf("invalid signature") -- cgit v1.2.3