Add option to clear a chain when it falls too far behind

This commit is contained in:
Jonathan Bennett
2026-01-03 20:36:37 -06:00
parent 1869f2108d
commit 8a059bae23
4 changed files with 39 additions and 3 deletions

View File

@@ -123,6 +123,7 @@ class StoreForwardPlusPlusModule : public ProtobufModule<meshtastic_StoreForward
sqlite3_stmt *maybeAddPeerStmt;
sqlite3_stmt *getPeerStmt;
sqlite3_stmt *updatePeerStmt;
sqlite3_stmt *clearChainStmt;
// For a given Meshtastic ChannelHash, fills the root_hash buffer with a 32-byte root hash
// returns true if the root hash was found
@@ -229,6 +230,8 @@ class StoreForwardPlusPlusModule : public ProtobufModule<meshtastic_StoreForward
void trimOldestLink(uint8_t *, size_t);
void clearChain(uint8_t *, size_t);
// given a link object with a payload and other fields, recalculates the message hash
// returns true if a match
bool recalculateHash(link_object &, uint8_t *, size_t, uint8_t *, size_t);