-
Notifications
You must be signed in to change notification settings - Fork 122
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
testpoolswap
RPC should check for a direct swap first when auto
is specified.
#1114
Comments
@surangap: Thanks for opening an issue, it is currently awaiting triage. The triage/accepted label can be added by foundation members by writing /triage accepted in a comment. DetailsI am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository. |
relates to BirthdayResearch/jellyfishsdk#1074 |
It seems like CPoolSwap::CalculateSwaps / CalculatePoolPaths doesn't look for a direct path. Just curious, which of the following are we looking to achieve for
|
What happened:
testpoolswap
from CAT -> DFI withpath = auto
,verbose = true
pools
field.{ path: 'auto', pools: [ '2', '2', '2' ], amount: '48.48437068@0' }
The above should be a direct swap since
CAT-DFI
pool is present.RCA
even in
compositeswap
check for a direct swap is done first and then goes to theCalculateSwaps()
andcompositeswap()
ref ->
ain/src/masternodes/rpc_poolpair.cpp
Line 919 in c0a25f7
but in the scenario mentioned above, it will call
CalculateSwaps()
straight. ref ->ain/src/masternodes/rpc_poolpair.cpp
Line 1091 in c0a25f7
it could be that the
CalculateSwaps()
is unable to handle this scenario well.But simply adding a check for a direct swap first should solve the issue(same as the
compositeswap
flow. ).ain/src/masternodes/rpc_poolpair.cpp
Line 1091 in c0a25f7
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
What are your environment parameters:
Anything else we need to know?:
The text was updated successfully, but these errors were encountered: