Commit 6a9bcbf
committed
Fix orphan blob accumulation on firmware upgrade
Before PR#1495, blobs were written for every advert regardless of
whether the advertiser became a contact. Nodes upgrading from older
firmware (e.g., v1.11.0) have thousands of orphan blobs consuming
storage space.
This adds a one-time cleanup on first boot that:
- Iterates all blob files in /bl/
- Deletes any blob that doesn't match a current contact's pub_key
- Creates a marker file to prevent running again
Affects ESP32 and RP2040 platforms (which use /bl/ directory).1 parent f7e92a7 commit 6a9bcbf
1 file changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
867 | 896 | | |
868 | 897 | | |
869 | 898 | | |
| |||
0 commit comments