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

Handle leftover amounts on the engine side #344

Merged
merged 8 commits into from
Oct 4, 2019
Merged

Conversation

gakonst
Copy link
Member

@gakonst gakonst commented Sep 27, 2019

Second part of #342

error!("Exceeded max retries when notifying connector about account {:?} for amount {:?} and transaction hash {:?}. Please check your API.", account_id_clone, amount_clone, tx_hash)
})
.and_then(move |ret| {
trace!("Accounting system responded with {:?}", ret);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should log a warning or error if they respond with something other than the amount we sent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interledger/rfcs#536 (review) I do not think that the accounting system should be required to return an amount, since it will track leftovers internally

@gakonst gakonst force-pushed the connector-handle-leftovers branch 2 times, most recently from 41b8ba6 to 02a9718 Compare October 3, 2019 09:30
@gakonst gakonst changed the base branch from connector-handle-leftovers to master October 4, 2019 00:43
We implemented FromRedisValue for AmountWithScale. lrange fetches the AmountWithScale as a list and cannot differentiate each tuple from another, hence we have to perform the summation in the deserialization method
We assume that the connector is able to handle any potential precision loss due to the engine sending an amount with higher granularity than the connector can handle
@gakonst gakonst merged commit 43dc677 into master Oct 4, 2019
@gakonst gakonst deleted the engine-handle-leftovers branch October 4, 2019 02:21
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.

None yet

2 participants