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

Replace ripple_path_find with path_find in paths snippet #2385

Closed
justinr1234 opened this issue Jul 17, 2023 · 4 comments
Closed

Replace ripple_path_find with path_find in paths snippet #2385

justinr1234 opened this issue Jul 17, 2023 · 4 comments

Comments

@justinr1234
Copy link
Collaborator

No description provided.

@JST5000
Copy link
Contributor

JST5000 commented Feb 14, 2024

Closing since ripple_path_find is a fine similar request to send

@JST5000 JST5000 closed this as completed Feb 14, 2024
@mvadari
Copy link
Collaborator

mvadari commented Feb 14, 2024

It is recommended that people use path_find instead of ripple_path_find especially when you have a WS client (like xrpl.js). IMO this should be reopened, since snippets should be promoting best practices.

@ckeshava
Copy link
Collaborator

@mvadari Both the commands path_find and ripple_path_find are supported by JSON-RPC protocol. Why is path_find recommended for WebSocket connections ? (apart from having to subscribe to continuous stream of updates)

The code-paths used by ripple_path_find and path_find requests culminate in https://github.com/XRPLF/rippled/blob/2f432e812cb773048530ebfaf2e0e6def51e3cc2/src/xrpld/app/paths/PathRequest.cpp#L244 . A substantial portion of their logic is performed by this common function.

@mvadari
Copy link
Collaborator

mvadari commented Aug 29, 2024

Both the commands path_find and ripple_path_find are supported by JSON-RPC protocol. Why is path_find recommended for WebSocket connections ? (apart from having to subscribe to continuous stream of updates)

path_find is recommended over ripple_path_find because paths change every ledger and ripple_path_find only returns the results once.

From the docs for ripple_path_find:

However, the results tend to become outdated as time passes. Instead of making multiple calls to stay updated, you should instead use the path_find method to subscribe to continued updates where possible.

ckeshava added a commit to ckeshava/xrpl.js that referenced this issue Sep 19, 2024
justinr1234 pushed a commit that referenced this issue Sep 19, 2024
* update Paths snippet test: perform prerequisite test setup within the test, remove dependence on theexternal state of testnet

* fix lint errors

* remove bridge snippet test, the sidechain has been shut down

* [FIX] Update paths snippet. Replace RipplePathFind with PathFind RPC (fixes #2385)
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

No branches or pull requests

4 participants