XRPLF / clio

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

Fix bug: api version change does not affect the subscribed session #1404

Closed cindyyan317 closed 1 month ago

cindyyan317 commented 1 month ago

Fix #1133 When subscribing the same stream twice with different api version parameter, the Clio would ignore the second request. Thus, the api version change would not take effect. In this PR, mimic rippled's behavior. No matter the stream is subscribed or not, the session's api version will always be updated by the latest subscribe api. Detail: https://github.com/XRPLF/rippled/blob/develop/src/ripple/rpc/handlers/Subscribe.cpp#L113

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 65.52%. Comparing base (a8c90a3) to head (f499033).

Files Patch % Lines
src/rpc/handlers/Subscribe.hpp 22.22% 0 Missing and 7 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1404 +/- ## =========================================== - Coverage 65.53% 65.52% -0.01% =========================================== Files 227 227 Lines 9319 9317 -2 Branches 5203 5203 =========================================== - Hits 6107 6105 -2 Misses 1753 1753 Partials 1459 1459 ```

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