Commit 9ebf3068 authored by Adin Schmahmann's avatar Adin Schmahmann

refactor: factor out reused string

parent 2c313a81
...@@ -75,8 +75,9 @@ func (pm *ProtocolMessenger) PutValue(ctx context.Context, p peer.ID, rec *recpb ...@@ -75,8 +75,9 @@ func (pm *ProtocolMessenger) PutValue(ctx context.Context, p peer.ID, rec *recpb
} }
if !bytes.Equal(rpmes.GetRecord().Value, pmes.GetRecord().Value) { if !bytes.Equal(rpmes.GetRecord().Value, pmes.GetRecord().Value) {
logger.Infow("value not put correctly", "put-message", pmes, "get-message", rpmes) const errStr = "value not put correctly"
return errors.New("value not put correctly") logger.Infow(errStr, "put-message", pmes, "get-message", rpmes)
return errors.New(errStr)
} }
return nil return nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment