From cb5c579ae46ee0570f2f32408e0427f989bd33ab Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 29 Apr 2022 15:08:53 +0200 Subject: change 'preimage' to 'message' Issue: #40 --- pkg/db/trillian.go | 2 +- pkg/db/trillian_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/db') diff --git a/pkg/db/trillian.go b/pkg/db/trillian.go index 34501b9..97f1305 100644 --- a/pkg/db/trillian.go +++ b/pkg/db/trillian.go @@ -26,7 +26,7 @@ func (c *TrillianClient) AddLeaf(ctx context.Context, req *requests.Leaf) error leaf := types.Leaf{ Statement: types.Statement{ ShardHint: req.ShardHint, - Checksum: *types.HashFn(req.Preimage[:]), + Checksum: *types.HashFn(req.Message[:]), }, Signature: req.Signature, KeyHash: *types.HashFn(req.VerificationKey[:]), diff --git a/pkg/db/trillian_test.go b/pkg/db/trillian_test.go index 0010e32..9a390a1 100644 --- a/pkg/db/trillian_test.go +++ b/pkg/db/trillian_test.go @@ -21,7 +21,7 @@ import ( func TestAddLeaf(t *testing.T) { req := &requests.Leaf{ ShardHint: 0, - Preimage: types.Hash{}, + Message: types.Hash{}, Signature: types.Signature{}, VerificationKey: types.PublicKey{}, DomainHint: "example.com", -- cgit v1.2.3