XRPLF / clio

An XRP Ledger API Server
https://xrpl.org
ISC License
55 stars 48 forks source link

Fix: Duplicate messages when subscribe both accounts and proposed_accounts #1415

Closed cindyyan317 closed 1 month ago

cindyyan317 commented 1 month ago

This PR is to fix the duplicate messages sent to the subscribers when accounts and proposed_accounts both subscribed by the same client. To align with rippled, Clio will filter out the same session for some cases:

Screenshot 2024-05-20 at 09 20 32

proposed_accounts subscribers will receive two json messages :

  1. The transaction json when transaction gets proposed
  2. The transaction + meta json when transaction gets validated. To filter out the session has sent the validated json, we only extract the proposed tx json from forwarding source. Clio will send the validated part by itself, being able to do filter.
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 96.29630% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 67.88%. Comparing base (99400d7) to head (a8a7729). Report is 2 commits behind head on develop.

Files Patch % Lines
src/feed/impl/TransactionFeed.cpp 95.23% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1415 +/- ## =========================================== + Coverage 67.80% 67.88% +0.07% =========================================== Files 232 232 Lines 9309 9335 +26 Branches 5203 5210 +7 =========================================== + Hits 6312 6337 +25 + Misses 1639 1638 -1 - Partials 1358 1360 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.