Skip to content

Commit c5d8230

Browse files
committed
sn/storage: Inline once used getRange() method
Signed-off-by: Leonard Lyubich <[email protected]>
1 parent 18190e2 commit c5d8230

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/services/object/get/get.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ func (s *Service) GetRange(ctx context.Context, prm RangePrm) error {
7777
ecRules, nodeLists[len(repRules):], prm.rng.GetOffset(), prm.rng.GetLength())
7878
}
7979

80-
func (s *Service) getRange(ctx context.Context, prm RangePrm, opts ...execOption) error {
81-
return s.get(ctx, prm.commonPrm, append(opts, withPayloadRange(prm.rng))...).err
82-
}
83-
8480
func (s *Service) GetRangeHash(ctx context.Context, prm RangeHashPrm) (*RangeHashRes, error) {
8581
hashes := make([][]byte, 0, len(prm.rngs))
8682

@@ -101,7 +97,7 @@ func (s *Service) GetRangeHash(ctx context.Context, prm RangeHashPrm) (*RangeHas
10197
hash: util.NewSaltingWriter(h, prm.salt),
10298
})
10399

104-
if err := s.getRange(ctx, rngPrm, withHash(&prm)); err != nil {
100+
if err := s.get(ctx, rngPrm.commonPrm, withHash(&prm), withPayloadRange(rngPrm.rng)).err; err != nil {
105101
return nil, err
106102
}
107103

0 commit comments

Comments
 (0)