singleCleaner class is a timer-driven thread that cleans data structures
to free memory, resends messages when a remote node doesn’t respond, and
sends pong messages to keep connections alive if the network isn’t busy.
- It cleans these data structures in memory:
- inventory (moves data to the on-disk sql database)
- inventorySets (clears then reloads data out of sql database)
- It cleans these tables on the disk:
- inventory (clears expired objects)
- pubkeys (clears pubkeys older than 4 weeks old which we have not used personally)
- knownNodes (clears addresses which have not been online for over 3 days)
- It resends messages when there has been no response:
- resends getpubkey messages in 5 days (then 10 days, then 20 days, etc…)
- resends msg messages in 5 days (then 10 days, then 20 days, etc…)
Equals 4 weeks. You could make this longer if you want but making it shorter would not be advisable because there is a very small possibility that it could keep you from obtaining a needed pubkey for a period of time.
The singleCleaner thread class
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
Resend pubkey request for address
Resend message by ackdata