A potential issue with the path_find and ripple_path_find when using both destination_amount and send_max was reported by Wietse Wind.
{
command: 'path_find',
subcommand: 'create',
source_account: 'rPdvC6ccq8hCdPKSPJkPmyZ4Mi1oG2FFkT',
destination_account: 'rPdvC6ccq8hCdPKSPJkPmyZ4Mi1oG2FFkT',
send_max: {
value: '10',
currency: 'USD',
issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B'
},
destination_amount: {
value: '-1',
currency: 'EUR',
issuer: 'rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq'
}
}
This works like a charm. Docs on send_max and destination_amount and the -1 value notation:


So, not using source_currencies, am using send_max, and I specify the -1 value for destination amount, so it’ll just go for send_max amount. » Works like a charm!

Now I do the same thing, but with “20000000” (20 XRP) in send_max.
{
"command": "path_find",
"subcommand": "create",
"source_account": "rPdvC6ccq8hCdPKSPJkPmyZ4Mi1oG2FFkT",
"destination_account": "rPdvC6ccq8hCdPKSPJkPmyZ4Mi1oG2FFkT",
"send_max": "20000000",
"destination_amount": {
"value": "-1",
"currency": "EUR",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq"
}
}
Works like a charm :slightly_smiling_face:

So now, last but not least, the other way around.
Send max = IOU
destination_amount = -1.
Docs say that should work.

Except it doesn’t! :wink:
So IOU to IOU works, XRP to IOU works, but IOU to XRP doesn’t, although the docs explicitly mention I can add XRP value notation (just string in drops)
{
"command": "ripple_path_find",
"source_account": "rPdvC6ccq8hCdPKSPJkPmyZ4Mi1oG2FFkT",
"destination_account": "rPdvC6ccq8hCdPKSPJkPmyZ4Mi1oG2FFkT",
"send_max": {
"value": "10",
"currency": "EUR",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq"
},
"destination_amount": "-1"
}

Always empty, no paths, no alternatives, for any send_max IOU
Confirmed this happens both for path_find and ripple_path_find btw.
Maybe this is by design (?) but the reason for informing/reporting (to Nik) is that it actually does work as expected for 'one way', and the docs mention the -1 notation could be used for XRP values.
Thanks @WietseWind This is a bug. I'll make sure a fix gets merged before 1.6 is released.
Thanks @WietseWind This is a bug. I'll make sure a fix gets merged before 1.6 is released.
Hey @seelabs, do you know if this made into 1.6.0 (just released)? Doesn't look like it when looking at the release notes?
@WietseWind No, the patch to fix this has not been merged. Unfortunately, I added this fix to related patch that is problematic for other reasons and didn't make 1.6. When that patch got blocked I should have unbundled the pathfinding fix from the rest of the patch before 1.6 was released. I apologize, as I did say the patch would make 1.6. I'll update this issue once the fix is merged into develop.
Hey @seelabs - just a friendly reminder/check to see if this is going to be included in the next version ;)
@WietseWind Yes, this is still on track to be included in 1.7.
@seelabs Just to confirm: still to be included in 1.7? As I don't see it on the 1.7 project board?
@WietseWind Yes, this will be included in 1.7.