Fix message hash recalc

This commit is contained in:
Jonathan Bennett
2026-01-08 14:48:21 -06:00
parent 4bb93c1ed2
commit 595b5f19b3
2 changed files with 22 additions and 21 deletions

View File

@@ -209,7 +209,7 @@ class StoreForwardPlusPlusModule : public ProtobufModule<meshtastic_StoreForward
// ingests a LINK_PROVIDE message and builds a link_object
// confirms the root hash and commit hash
link_object ingestLinkMessage(meshtastic_StoreForwardPlusPlus *, bool = true);
link_object ingestLinkMessage(meshtastic_StoreForwardPlusPlus *);
// retrieves a link object from the canonical chain database given a commit hash
link_object getLink(uint8_t *, size_t);
@@ -241,6 +241,8 @@ class StoreForwardPlusPlusModule : public ProtobufModule<meshtastic_StoreForward
void clearChain(uint8_t *, size_t);
void recalculateMessageHash(link_object &);
// 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);