Merge pull request #663 from liamcottle/feature/remove-neighbour

Add CLI command to remove neighbour
This commit is contained in:
ripplebiz 2025-08-29 16:50:08 +10:00 committed by GitHub
commit d012dc7fd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 25 additions and 0 deletions

View file

@ -719,6 +719,17 @@ public:
*dp = 0; // null terminator
}
void removeNeighbor(const uint8_t* pubkey, int key_len) override {
#if MAX_NEIGHBOURS
for (int i = 0; i < MAX_NEIGHBOURS; i++) {
NeighbourInfo* neighbour = &neighbours[i];
if(memcmp(neighbour->id.pub_key, pubkey, key_len) == 0){
neighbours[i] = NeighbourInfo(); // clear neighbour entry
}
}
#endif
}
mesh::LocalIdentity& getSelfId() override { return self_id; }
void clearStats() override {