ilp-protocol-stream icon indicating copy to clipboard operation
ilp-protocol-stream copied to clipboard

fix: start with the amount used to calculate the exchange rate

Open traviscrist opened this issue 7 years ago • 1 comments

Use the packet amount from the best exchange rate calculation so instead of using the max which we know will bounce due to a T04 we use what we know can make it through.

Current logic: 1, 1000, 1000000, 1000000000, 10000000000000 -> Sent 0, 2, F08, F08, F08 <- max amount 100,000

100,000 -> Sent T04 <-

66,000 -> Sent Success <-

Start sending using: 100,000. New logic will use the 66,000 so we don't immediately trigger a T04.

traviscrist avatar Oct 25 '18 23:10 traviscrist

Could you add a test that exercises the case described in the PR description?

sentientwaffle avatar Oct 26 '18 15:10 sentientwaffle