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

Add delivered amount to GetAccountTransactionHistory responses #3370

Closed
wants to merge 1 commit into from

Conversation

cjcobb23
Copy link
Contributor

@cjcobb23 cjcobb23 commented Apr 22, 2020

The delivered_amount field was not being populated when calling GetAccountTransactionHistory. In contrast, the delivered_amount field was being populated when calling GetTransaction. This change populates delivered_amount in the response to GetAccountTransactionHistory, and adds a unit test to make sure the results delivered by GetTransaction and GetAccountTransactionHistory match each other.


This change is Reviewable

@codecov-io
Copy link

codecov-io commented Apr 22, 2020

Codecov Report

Merging #3370 into develop will decrease coverage by 0.00%.
The diff coverage is 90.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3370      +/-   ##
===========================================
- Coverage    70.23%   70.23%   -0.01%     
===========================================
  Files          683      683              
  Lines        54630    54634       +4     
===========================================
+ Hits         38370    38372       +2     
- Misses       16260    16262       +2     
Impacted Files Coverage Δ
src/ripple/rpc/impl/GRPCHelpers.cpp 82.95% <50.00%> (-0.08%) ⬇️
src/ripple/rpc/handlers/AccountTx.cpp 85.34% <100.00%> (+0.10%) ⬆️
src/ripple/server/impl/BaseWSPeer.h 68.10% <0.00%> (-0.55%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bf3b19...b0addb9. Read the comment docs.

scottschurr
scottschurr previously approved these changes Apr 25, 2020
Copy link
Collaborator

@scottschurr scottschurr left a comment

Choose a reason for hiding this comment

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

I'm not very good at reading the gRPC/proto calls but, from what I can make out, the code makes the intended change. I also verified the unit test change by reverting the AccountTx.cpp changes and seeing the unit test fail. As far as I can tell this change is good to go 👍

src/test/rpc/Tx_test.cpp Outdated Show resolved Hide resolved
src/ripple/rpc/handlers/AccountTx.cpp Outdated Show resolved Hide resolved
src/test/rpc/Tx_test.cpp Outdated Show resolved Hide resolved
seelabs
seelabs previously approved these changes Apr 27, 2020
Copy link
Collaborator

@seelabs seelabs left a comment

Choose a reason for hiding this comment

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

Left one nit, but 👍 regardless of what you decide to do about that.

src/ripple/rpc/handlers/AccountTx.cpp Outdated Show resolved Hide resolved
thejohnfreeman
thejohnfreeman previously approved these changes Apr 28, 2020
Copy link
Collaborator

@thejohnfreeman thejohnfreeman left a comment

Choose a reason for hiding this comment

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

My comments are all minor preferences.

@carlhua carlhua removed their request for review April 28, 2020 22:56
@cjcobb23 cjcobb23 dismissed stale reviews from thejohnfreeman and seelabs via 2590960 April 29, 2020 16:57
@cjcobb23 cjcobb23 force-pushed the accountTxDeliveredAmount branch from 2590960 to bdb1b26 Compare April 29, 2020 17:18
@cjcobb23
Copy link
Contributor Author

Rebased and squashed

@cjcobb23
Copy link
Contributor Author

My comments are all minor preferences.

@thejohnfreeman I implemented all of your minor preferences

thejohnfreeman
thejohnfreeman previously approved these changes Apr 30, 2020
seelabs
seelabs previously approved these changes Apr 30, 2020
Copy link
Collaborator

@seelabs seelabs left a comment

Choose a reason for hiding this comment

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

Left a few additional comments that you can address however you want. 👍 no matter what you decided to do with them.

src/test/rpc/Tx_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/Tx_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/Tx_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/Tx_test.cpp Outdated Show resolved Hide resolved
scottschurr
scottschurr previously approved these changes Apr 30, 2020
Copy link
Collaborator

@scottschurr scottschurr left a comment

Choose a reason for hiding this comment

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

👍 Left one minor nit, but looks good to me, particularly with the changes that @thejohnfreeman and @seelabs recommend.

src/test/rpc/Tx_test.cpp Outdated Show resolved Hide resolved
@cjcobb23 cjcobb23 dismissed stale reviews from seelabs and thejohnfreeman via 57d7a61 May 1, 2020 23:14
@cjcobb23 cjcobb23 force-pushed the accountTxDeliveredAmount branch from bdb1b26 to 57d7a61 Compare May 1, 2020 23:14
@cjcobb23 cjcobb23 force-pushed the accountTxDeliveredAmount branch from 57d7a61 to b0addb9 Compare May 2, 2020 03:27
@cjcobb23
Copy link
Contributor Author

cjcobb23 commented May 5, 2020

Addressed final comments. Rebased and squashed again.

@cjcobb23
Copy link
Contributor Author

cjcobb23 commented May 8, 2020

@seelabs @thejohnfreeman @scottschurr Can someone approve this and add a passed label, if everything looks good? I'm finished making changes.

Copy link
Collaborator

@seelabs seelabs left a comment

Choose a reason for hiding this comment

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

Re-reviewed latest patches. Still 👍 from me.

@seelabs seelabs added the Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. label May 8, 2020
Copy link
Collaborator

@scottschurr scottschurr left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants