[#44] services/object: Refactor for minor optimization

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-24 18:18:46 +03:00 committed by Alex Vanin
parent 3692032e30
commit 6f4b477195
3 changed files with 3 additions and 3 deletions

View file

@ -63,7 +63,7 @@ func (h *distributedHeader) prepare(ctx context.Context, prm *Prm) error {
if prm.local {
// use local-only placement builder
builder = util.NewLocalPlacement(placement.NewNetworkMapBuilder(nm), h.localAddrSrc)
builder = util.NewLocalPlacement(builder, h.localAddrSrc)
}
// set placement builder

View file

@ -108,7 +108,7 @@ func (p *Streamer) preparePrm(prm *PutInitPrm) error {
prm.traverseOpts = append(prm.traverseOpts, placement.SuccessAfter(1))
// use local-only placement builder
builder = util.NewLocalPlacement(placement.NewNetworkMapBuilder(nm), p.localAddrSrc)
builder = util.NewLocalPlacement(builder, p.localAddrSrc)
}
// set placement builder

View file

@ -113,7 +113,7 @@ func (p *Streamer) preparePrm(prm *Prm) error {
traverseOpts = append(traverseOpts, placement.SuccessAfter(1))
// use local-only placement builder
builder = util.NewLocalPlacement(placement.NewNetworkMapBuilder(nm), p.localAddrSrc)
builder = util.NewLocalPlacement(builder, p.localAddrSrc)
}
// set placement builder