-
Notifications
You must be signed in to change notification settings - Fork 70
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
Conversation
07f00b6
to
e3f868d
Compare
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
crates/interledger-settlement-engines/src/stores/redis_store_common.rs
Outdated
Show resolved
Hide resolved
e628790
to
fe68b9d
Compare
41b8ba6
to
02a9718
Compare
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
fe68b9d
to
f5c7b9f
Compare
Second part of #342