mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-02 08:00:38 +00:00
Empty hash in link send
This commit is contained in:
@@ -599,8 +599,8 @@ bool StoreForwardPlusPlusModule::broadcastLink(uint8_t *_commit_hash, size_t _co
|
||||
memcpy(storeforward.message.bytes, _payload, storeforward.message.size);
|
||||
|
||||
uint8_t *_message_hash = (uint8_t *)sqlite3_column_blob(getLinkStmt, 4);
|
||||
storeforward.message_hash.size = 8;
|
||||
memcpy(storeforward.message_hash.bytes, _message_hash, storeforward.message_hash.size);
|
||||
// storeforward.message_hash.size = 8;
|
||||
// memcpy(storeforward.message_hash.bytes, _message_hash, storeforward.message_hash.size);
|
||||
|
||||
storeforward.encapsulated_rxtime = sqlite3_column_int(getLinkStmt, 5);
|
||||
|
||||
@@ -893,7 +893,6 @@ StoreForwardPlusPlusModule::link_object StoreForwardPlusPlusModule::ingestLinkMe
|
||||
|
||||
// What if we don't have this root hash? Should drop this packet before this point.
|
||||
lo.channel_hash = getChannelHashFromRoot(t->root_hash.bytes, t->root_hash.size);
|
||||
printBytes("Incoming message hash: 0x", t->message_hash.bytes, t->message_hash.size);
|
||||
SHA256 message_hash;
|
||||
|
||||
memcpy(lo.encrypted_bytes, t->message.bytes, t->message.size);
|
||||
@@ -906,7 +905,6 @@ StoreForwardPlusPlusModule::link_object StoreForwardPlusPlusModule::ingestLinkMe
|
||||
message_hash.update(&lo.id, sizeof(lo.id));
|
||||
message_hash.finalize(lo.message_hash, 32);
|
||||
lo.message_hash_len = 32;
|
||||
printBytes("after message hash: 0x", lo.message_hash, lo.message_hash_len);
|
||||
|
||||
// TODO: recalculate these
|
||||
|
||||
|
||||
Reference in New Issue
Block a user