Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: Alexandru Vasile <alexandru.vasile@parity.io>
- Loading branch information