From 658e26e29a3bb4c3aba3136c20d6e78b420c9872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20S=C3=A1rai?= Date: Mon, 29 Jul 2024 14:55:41 +0200 Subject: [PATCH] feat(act): history --- pkg/bee/api/act.go | 4 +--- pkg/bee/api/api.go | 2 +- pkg/check/act/act.go | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/bee/api/act.go b/pkg/bee/api/act.go index 15f26a47d..b57c81ad2 100644 --- a/pkg/bee/api/act.go +++ b/pkg/bee/api/act.go @@ -44,9 +44,7 @@ func (a *ActService) AddGrantees(ctx context.Context, name string, data io.Reade var resp ActGranteesResponse h := http.Header{} h.Add("swarm-postage-batch-id", o.BatchID) - if o.ActHistoryAddress != nil { - h.Add("swarm-act-history-address", o.ActHistoryAddress.String()) - } + h.Add("swarm-act-history-address", o.ActHistoryAddress.String()) err := a.client.requestWithHeader(ctx, http.MethodPost, "/"+apiVersion+"/grantee", h, data, &resp) return resp, err } diff --git a/pkg/bee/api/api.go b/pkg/bee/api/api.go index e381ef4f4..f0f4f00dc 100644 --- a/pkg/bee/api/api.go +++ b/pkg/bee/api/api.go @@ -318,7 +318,7 @@ type UploadOptions struct { Tag uint64 BatchID string Direct bool - ActHistoryAddress *swarm.Address + ActHistoryAddress swarm.Address } type DownloadOptions struct { diff --git a/pkg/check/act/act.go b/pkg/check/act/act.go index 5dedda970..a33f1d614 100644 --- a/pkg/check/act/act.go +++ b/pkg/check/act/act.go @@ -143,7 +143,7 @@ func (c *Check) Run(ctx context.Context, cluster orchestration.Cluster, opts int }`))) fileHis := file.HistroryAddress() - err = upClient.AddActGrantees(ctx, &gFile, api.UploadOptions{BatchID: batchID, ActHistoryAddress: &fileHis}) + err = upClient.AddActGrantees(ctx, &gFile, api.UploadOptions{BatchID: batchID, ActHistoryAddress: fileHis}) if err != nil { return fmt.Errorf("node %s: add grantees error: %w", upNodeName, err) }