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)
Wed, Jun 19, 5:40 PM
Unknown Object (File)
Wed, Jun 19, 1:43 PM
Unknown Object (File)
Wed, Jun 19, 1:43 PM
Unknown Object (File)
Wed, Jun 19, 1:43 PM
Unknown Object (File)
Wed, Jun 19, 9:49 AM
Unknown Object (File)
Thu, Jun 13, 3:18 PM
Unknown Object (File)
Tue, Jun 11, 6:15 PM
Unknown Object (File)
Mon, Jun 10, 10:52 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.Fri, May 24, 3:06 AM