[#275] reputation/convert: Add nil check

In `SendIntermediateResultRequestBody`
add nil check for `trust` field.
If true, allocate new `PeerToPeerTrust`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-04-27 09:52:23 +03:00 committed by Pavel Karpy
parent 0f7a14a69f
commit bb217067f4
2 changed files with 13 additions and 5 deletions

View file

@ -111,10 +111,9 @@ func GenerateSendIntermediateResultRequestBody(empty bool) *reputation.SendInter
if !empty {
m.SetEpoch(123)
m.SetIteration(564)
m.SetTrust(GeneratePeerToPeerTrust(empty))
}
m.SetTrust(GeneratePeerToPeerTrust(empty))
return m
}