3.1.7.12 Contact Maintenance

Contact Maintenance involves calculating the desired range of Contact Records, and then checking that the current Contact count falls within that range. If there is no contact record in the local database with its Deleted flag unset and with the local node's node ID, and the number of Contact Records with their Deleted flags unset in the database is below the minimum (Cmin) calculated as specified below, or if there is a contact record with its Deleted flag unset in the local database with the local node's node ID, and the number of Contact Records with their Deleted flags unset in the database is above the maximum (Cmax) calculated as specified below, then the Contact Timer MUST be set for a random delay between 10 seconds and 180 seconds. For more details, see section 3.1.6.3.

Cmin MUST be calculated as follows:

           

Where S is the current Graph Signature, treated as an unsigned integer. The maximum number of Contacts Cmax MUST be calculated as the minimum number of Contacts plus 5: