Page MenuHomePhabricator

[lib] implement removing OutboundP2P messages after confirmation
ClosedPublic

Authored by kamil on May 20 2024, 3:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 2:18 AM
Unknown Object (File)
Sat, Nov 9, 12:03 AM
Unknown Object (File)
Fri, Nov 1, 8:28 AM
Unknown Object (File)
Oct 14 2024, 4:27 PM
Unknown Object (File)
Oct 14 2024, 4:27 PM
Unknown Object (File)
Oct 14 2024, 4:27 PM
Unknown Object (File)
Oct 14 2024, 4:27 PM
Unknown Object (File)
Oct 14 2024, 4:26 PM
Subscribers

Details

Summary

After other peer process (backup message) we can remove it.
We track the order so when removing we can remove all older messages.

Tunnelbroker adds its own timestamp to message see here so we have to extract it. This is simple but moving this to function with descriptive name to improve readability.

Depends on D12077, D12080

Test Plan

Send confirmation and making sure that the message is removed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.May 20 2024, 5:16 AM
lib/utils/peer-to-peer-communication-utils.js
6 ↗(On Diff #40385)

Should we check if the argument passed is an actual client message ID and contains the hash, or can we blindly trust if this is always called in the right context?

lib/utils/peer-to-peer-communication-utils.js
6 ↗(On Diff #40385)

added check and error when ID is not in correct format

This revision is now accepted and ready to land.May 24 2024, 3:06 AM