## How does a node forget about other nodes?

2

1

It is said that addr message: Provide information on known nodes of the network. Non-advertised nodes should be forgotten after typically 3 hours.

I did not totally understood what does it mean forgetting a node? A node has a list of peers, and it is checking every 3 hours if these peer are active? Does it work like this? How does this forgetting mechanism work?

Where did you read this? – Pieter Wuille – 2017-06-12T22:03:23.717

– Önder Gürcan – 2017-06-13T07:29:50.490

Ignore that wiki, it was inaccurate when most of it was written years ago, and has been unmaintained since, mostly. I suggest using the bitcoin.org developer documentation instead. – Pieter Wuille – 2017-06-13T07:42:10.160

OK. So does it mean that there is no neighbour forgetting if it does not respond in 3 hours or something like that? The answer to my question is still missing. – Önder Gürcan – 2017-06-13T08:34:41.583

I'll write a full answer too when I have time; this is just a short comment to let you know the premise makes little sense. – Pieter Wuille – 2017-06-13T11:00:54.127

OK. I am waiting for your answer. – Önder Gürcan – 2017-06-14T12:39:10.483

There is no need for a node to "forget" a node. This is not something that is required nor necessary. What Bitcoin Core does in response to a getaddr message (so it sends an addr message) is that it checks its list of nodes. It filters through that list for the things that it recently had a connection to and that it didn't have multiple failed connections to before. There is no checking that a node is actually live and it doesn't do it on a set timer either.