* ID hash 0x00 and 0xFF now reserved for future.

This commit is contained in:
Scott Powell committed 2025-04-06 12:34:09 +10:00
1 parent 98d29a7a2b
commit 7d731e82f5
4 files changed
+16

No files matched your search

+4
View File
@@ -228,6 +228,10 @@ class MyMesh : public BaseChatMesh {
void loadMainIdentity() {
if (!_identity_store->load("_main", self_id)) {
self_id = radio_new_identity(); // create new random identity
int count = 0;
while (count < 10 && (self_id.pub_key[0] == 0x00 || self_id.pub_key[0] == 0xFF)) { // reserved id hashes
self_id = radio_new_identity(); count++;
}
saveMainIdentity(self_id);
}
}