This commit is contained in:
Jonathan Bennett
2025-12-14 17:44:30 -06:00
parent 4dd43c7753
commit ecdcbe5c09

View File

@@ -181,12 +181,12 @@ bool StoreForwardPlusPlusModule::handleReceivedProtobuf(const meshtastic_MeshPac
if (portduino_config.sfpp_stratum0) { if (portduino_config.sfpp_stratum0) {
LOG_WARN("Received a CANON_ANNOUNCE while stratum 0"); LOG_WARN("Received a CANON_ANNOUNCE while stratum 0");
} else { } else {
uint8_t tmp_hash_bytes[32] = {0}; uint8_t tmp_root_hash_bytes[32] = {0};
LOG_WARN("Received a CANON_ANNOUNCE"); LOG_WARN("Received a CANON_ANNOUNCE");
if (getRootFromChannelHash(router->p_encrypted->channel, tmp_hash_bytes)) { if (getRootFromChannelHash(router->p_encrypted->channel, tmp_root_hash_bytes)) {
// we found the hash, check if it's the right one // we found the hash, check if it's the right one
if (memcmp(tmp_hash_bytes, t->root_hash.bytes, 32) != 0) { if (memcmp(tmp_root_hash_bytes, t->root_hash.bytes, 32) != 0) {
LOG_WARN("Found root hash, and it doesn't match!"); LOG_WARN("Found root hash, and it doesn't match!");
return true; return true;
} }
@@ -208,7 +208,7 @@ bool StoreForwardPlusPlusModule::handleReceivedProtobuf(const meshtastic_MeshPac
("End of chain does not match!"); ("End of chain does not match!");
} else { } else {
LOG_WARN("No Messages on this chain, request!"); LOG_WARN("No Messages on this chain, request!");
requestNextMessage(last_message_chain_hash, last_message_chain_hash); requestNextMessage(t->root_hash.bytes, t->root_hash.bytes);
} }
// compare to chain tip in incoming message // compare to chain tip in incoming message