forked from TrueCloudLab/frostfs-node
[#452] Use API structures for reputation PeerID and GlobalTrust
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
7cf48d4d91
commit
27cf6f5112
6 changed files with 116 additions and 36 deletions
|
@ -10,16 +10,18 @@ import (
|
|||
|
||||
func (rp *Processor) handlePutReputation(ev event.Event) {
|
||||
put := ev.(reputationEvent.Put)
|
||||
peerID := put.PeerID()
|
||||
|
||||
rp.log.Info("notification",
|
||||
zap.String("type", "reputation put"),
|
||||
zap.String("peer_id", hex.EncodeToString(put.PeerID().Bytes())))
|
||||
zap.String("peer_id", hex.EncodeToString(peerID.ToV2().GetValue())))
|
||||
|
||||
// send event to the worker pool
|
||||
|
||||
err := rp.pool.Submit(func() {
|
||||
rp.processPut(
|
||||
put.Epoch(),
|
||||
put.PeerID(),
|
||||
peerID,
|
||||
put.Value(),
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue