Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failing assert in connect RPC #5235

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Jan 7, 2025

High Level Overview of Change

This PR fixes a failing assert scenario in the connect admin RPC.

Context of Change

When a node is in standalone mode and someone with admin access tries to submit this command, rippled fails an assert (and crashes in debug builds), regardless of what the other parameters are.

Example crashing command:

{
  "command": "connect"
}

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

API Impact

N/A, fixes something that results in a failed assert before

Before / After

Before, use of the connect RPC on a standalone node fails an assert in rippled. Now, it returns an error.

Test Plan

Tested locally.

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.9%. Comparing base (040cd23) to head (9e03050).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5235   +/-   ##
=======================================
  Coverage     77.9%   77.9%           
=======================================
  Files          783     783           
  Lines        66707   66708    +1     
  Branches      8118    8115    -3     
=======================================
+ Hits         51954   51959    +5     
+ Misses       14753   14749    -4     
Files with missing lines Coverage Δ
src/xrpld/rpc/handlers/Connect.cpp 17.6% <100.0%> (+17.6%) ⬆️

... and 2 files with indirect coverage changes

Impacted file tree graph

@ximinez ximinez added Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. and removed Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. labels Jan 7, 2025
@mvadari mvadari changed the title fix crash in connect RPC fix failing assert in connect RPC Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants