forked from TrueCloudLab/frostfs-node
[#488] reputation/local/storage: Add trusting peer
Fix iteration logic after adding trusting peer in `Trust` struct. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
dbff8e9b3f
commit
d3c1fc7dda
3 changed files with 3 additions and 4 deletions
|
@ -81,6 +81,7 @@ func (it *TrustIterator) Iterate(h reputation.TrustHandler) error {
|
||||||
trust := reputation.Trust{}
|
trust := reputation.Trust{}
|
||||||
trust.SetPeer(reputation.PeerIDFromBytes(nm.Nodes[i].PublicKey()))
|
trust.SetPeer(reputation.PeerIDFromBytes(nm.Nodes[i].PublicKey()))
|
||||||
trust.SetValue(p)
|
trust.SetValue(p)
|
||||||
|
trust.SetTrustingPeer(reputation.PeerIDFromBytes(it.storage.LocalKey))
|
||||||
|
|
||||||
if err := h(trust); err != nil {
|
if err := h(trust); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -9,8 +9,6 @@ import (
|
||||||
// All values must comply with the requirements imposed on them.
|
// All values must comply with the requirements imposed on them.
|
||||||
// Passing incorrect parameter values will result in constructor
|
// Passing incorrect parameter values will result in constructor
|
||||||
// failure (error or panic depending on the implementation).
|
// failure (error or panic depending on the implementation).
|
||||||
//
|
|
||||||
// The component is not parameterizable at the moment.
|
|
||||||
type Prm struct {}
|
type Prm struct {}
|
||||||
|
|
||||||
// Storage represents in-memory storage of
|
// Storage represents in-memory storage of
|
||||||
|
|
Loading…
Reference in a new issue