aboutsummaryrefslogtreecommitdiff
path: root/pkg/db
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/db')
-rw-r--r--pkg/db/trillian.go2
-rw-r--r--pkg/db/trillian_test.go6
2 files changed, 3 insertions, 5 deletions
diff --git a/pkg/db/trillian.go b/pkg/db/trillian.go
index 25b2fb3..453a884 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: req.Checksum,
+ Checksum: *types.HashFn(req.Preimage[:]),
},
Signature: req.Signature,
KeyHash: *types.HashFn(req.VerificationKey[:]),
diff --git a/pkg/db/trillian_test.go b/pkg/db/trillian_test.go
index 955fc46..4dc561d 100644
--- a/pkg/db/trillian_test.go
+++ b/pkg/db/trillian_test.go
@@ -20,10 +20,8 @@ import (
func TestAddLeaf(t *testing.T) {
req := &requests.Leaf{
- Statement: types.Statement{
- ShardHint: 0,
- Checksum: types.Hash{},
- },
+ ShardHint: 0,
+ Preimage: types.Hash{},
Signature: types.Signature{},
VerificationKey: types.PublicKey{},
DomainHint: "example.com",