Skip to content
Unverified Commit d4657f86 authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

litep2p/peerstore: Fix bump last updated time (#4971)



This PR bumps the last time of a reputation update of a peer.
Doing so ensures the peer remains in the peerstore for longer than 1
hour.

Libp2p updates the `last_updated` field as well.

Small summary for the peerstore:
- A: when peers are reported the `last_updated` time is set to current
time (not done before this PR)
- B: peers that were not updated for 1 hour are removed from the
peerstore
- the reputation of the peers is decaying to zero over time
- peers are reported with a reputation change (positive or negative
depending on the behavior)

Because, (A) was not updating the `last_updated` time, we might lose the
reputation of peers that are constantly updated after 1hour because of
(B).

cc @paritytech/networking

Signed-off-by: default avatarAlexandru Vasile <[email protected]>
parent 7290042a
Pipeline #484410 waiting for manual action with stages
in 1 hour, 19 minutes, and 1 second
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