Optimize memory allocations #784
1 changed files with 1 additions and 0 deletions
|
@ -122,6 +122,7 @@ func (s *SignService) Head(ctx context.Context, req *object.HeadRequest) (*objec
|
|||
}
|
||||
|
||||
func (s *SignService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error) {
|
||||
req.GetBody().SetMarshalData(nil)
|
||||
|
||||
if err := s.sigSvc.VerifyRequest(req); err != nil {
|
||||
resp := new(object.PutSingleResponse)
|
||||
return resp, s.sigSvc.SignResponse(resp, err)
|
||||
|
|
Loading…
Reference in a new issue
Why do we need this line?
Here we marshal data and store it in PutSingleRequest, so next
StableMarshal
calls (for signature verification and save to shard) will use already prepared data.