Skip to content

Commit

Permalink
fix: save stamp issuer after failed uploads (ethersphere#4684)
Browse files Browse the repository at this point in the history
  • Loading branch information
istae authored and aranyia committed Jul 9, 2024
1 parent 107e012 commit eeda3d4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,11 @@ func (p *putterSessionWrapper) Put(ctx context.Context, chunk swarm.Chunk) error
}

func (p *putterSessionWrapper) Done(ref swarm.Address) error {
err := p.PutterSession.Done(ref)
if err != nil {
return err
}
return p.save()
return errors.Join(p.PutterSession.Done(ref), p.save())
}

func (p *putterSessionWrapper) Cleanup() error {
return p.PutterSession.Cleanup()
return errors.Join(p.PutterSession.Cleanup(), p.save())
}

func (s *Service) getStamper(batchID []byte) (postage.Stamper, func() error, error) {
Expand Down

0 comments on commit eeda3d4

Please sign in to comment.