From 3d768c837095daebdf97a6e9383fd2141cfa31f7 Mon Sep 17 00:00:00 2001 From: Al Cutter Date: Thu, 9 Jan 2025 15:02:45 +0000 Subject: [PATCH] Update callers --- storage/aws/aws.go | 6 +++++- storage/gcp/gcp.go | 6 +++++- storage/mysql/mysql.go | 6 +++++- storage/posix/files.go | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/storage/aws/aws.go b/storage/aws/aws.go index b01a40a3..49b2d7a6 100644 --- a/storage/aws/aws.go +++ b/storage/aws/aws.go @@ -428,7 +428,11 @@ func (s *Storage) integrate(ctx context.Context, fromSeq uint64, entries []stora }) errG.Go(func() error { - newSize, root, tiles, err := storage.Integrate(ctx, getTiles, fromSeq, entries) + lh := make([][]byte, len(entries)) + for i, e := range entries { + lh[i] = e.LeafHash + } + newSize, root, tiles, err := storage.Integrate(ctx, getTiles, fromSeq, lh) if err != nil { return fmt.Errorf("Integrate: %v", err) } diff --git a/storage/gcp/gcp.go b/storage/gcp/gcp.go index 1f5ad5df..7bf1287a 100644 --- a/storage/gcp/gcp.go +++ b/storage/gcp/gcp.go @@ -382,7 +382,11 @@ func (s *Storage) integrate(ctx context.Context, fromSeq uint64, entries []stora return n, nil } - newSize, root, tiles, err := storage.Integrate(ctx, getTiles, fromSeq, entries) + lh := make([][]byte, len(entries)) + for i, e := range entries { + lh[i] = e.LeafHash + } + newSize, root, tiles, err := storage.Integrate(ctx, getTiles, fromSeq, lh) if err != nil { return fmt.Errorf("Integrate: %v", err) } diff --git a/storage/mysql/mysql.go b/storage/mysql/mysql.go index 0c79e1d6..6096d4a8 100644 --- a/storage/mysql/mysql.go +++ b/storage/mysql/mysql.go @@ -501,7 +501,11 @@ func (s *Storage) integrate(ctx context.Context, tx *sql.Tx, fromSeq uint64, ent } } - newSize, newRoot, tiles, err := storage.Integrate(ctx, getTiles, fromSeq, sequencedEntries) + lh := make([][]byte, len(sequencedEntries)) + for i, e := range sequencedEntries { + lh[i] = e.LeafHash + } + newSize, newRoot, tiles, err := storage.Integrate(ctx, getTiles, fromSeq, lh) if err != nil { return fmt.Errorf("tb.Integrate: %v", err) } diff --git a/storage/posix/files.go b/storage/posix/files.go index 63ec6490..6783c139 100644 --- a/storage/posix/files.go +++ b/storage/posix/files.go @@ -275,7 +275,11 @@ func (s *Storage) doIntegrate(ctx context.Context, fromSeq uint64, entries []sto return n, nil } - newSize, newRoot, tiles, err := storage.Integrate(ctx, getTiles, fromSeq, entries) + lh := make([][]byte, len(entries)) + for i, e := range entries { + lh[i] = e.LeafHash + } + newSize, newRoot, tiles, err := storage.Integrate(ctx, getTiles, fromSeq, lh) if err != nil { klog.Errorf("Integrate: %v", err) return fmt.Errorf("Integrate: %v", err)