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

fix "account_nfts" with unassociated marker returning issue #5045

Merged
merged 16 commits into from
Jul 2, 2024

Conversation

yinyiqian1
Copy link
Collaborator

fix #4314

High Level Overview of Change

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@yinyiqian1 yinyiqian1 marked this pull request as draft June 14, 2024 14:00
@yinyiqian1 yinyiqian1 marked this pull request as ready for review June 14, 2024 17:49
@seelabs seelabs requested a review from shawnxie999 June 17, 2024 15:22
@seelabs seelabs requested a review from scottschurr June 17, 2024 15:24
add more test

change test name

create unit test
Copy link
Collaborator

@shawnxie999 shawnxie999 left a comment

Choose a reason for hiding this comment

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

Good job! left some comments.

also I'm wondering if this should be part of a new API version instead? @intelliot do you know if such API bug changes should introduce a new version or can we just change directly? (edit: nevermind i don't think it needs it since it's not breaking change)

src/ripple/rpc/handlers/AccountObjects.cpp Outdated Show resolved Hide resolved
src/ripple/rpc/handlers/AccountObjects.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.3%. Comparing base (ef02893) to head (7cfe5b2).

Current head 7cfe5b2 differs from pull request most recent head bf284e7

Please upload reports for the commit bf284e7 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5045     +/-   ##
=========================================
- Coverage     71.3%   71.3%   -0.0%     
=========================================
  Files          796     796             
  Lines        66987   66978      -9     
  Branches     10892   10870     -22     
=========================================
- Hits         47793   47774     -19     
- Misses       19194   19204     +10     
Files Coverage Δ
src/ripple/rpc/handlers/AccountObjects.cpp 92.9% <100.0%> (ø)

... and 1591 files with indirect coverage changes

Impacted file tree graph

@intelliot
Copy link
Collaborator

I'm wondering if this should be part of a new API version instead? @intelliot do you know if such API bug changes should introduce a new version or can we just change directly? (edit: nevermind i don't think it needs it since it's not breaking change)

Right - I see this as a bug fix. However, if we know with certainty that there are API consumers who will be broken by this change, then it would also be ok to put it on api_version 3. But currently, I don't think that is needed.

src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
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.

Thanks for this pull request. This looks like a good change. I left a number of comments for you to consider. Most of the comments are optional, but I think they are good guidance. However the implementation of the createFakeNFTMarker lambda really needs to get fixed.

In case it's useful, I piled all of the changes I'm suggesting into the top-most commit here: https://github.com/scottschurr/rippled/commits/yinyiqian1-br_fix_nft_page/ You can look at the commit to see what I intended with my suggestions. You are also welcome to cherry-pick the commit if you decide you want to adopt all of the suggested changes.

I hope that helps. Feel free to ask further questions about any of the comments that I left. And thanks again for the pull request.

src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Outdated Show resolved Hide resolved
src/test/rpc/AccountObjects_test.cpp Show resolved Hide resolved
src/xrpld/rpc/handlers/AccountObjects.cpp Outdated Show resolved Hide resolved
src/xrpld/rpc/handlers/AccountObjects.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@shawnxie999 shawnxie999 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

👍 Looks great! Thanks for the submission.

@scottschurr scottschurr added the Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. label Jun 26, 2024
@yinyiqian1 yinyiqian1 added Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. and removed Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. labels Jun 26, 2024
@zrayn zrayn merged commit e1534a3 into XRPLF:develop Jul 2, 2024
15 of 17 checks passed
vlntb pushed a commit to vlntb/rippled that referenced this pull request Aug 23, 2024
* fix "account_nfts" with unassociated marker returning issue

* create unit test for fixing nft page invalid marker not returning error

add more test

change test name

create unit test

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* [FOLD] accumulated review suggestions

* move BEAST check out of lambda function

---------

Authored-by: Scott Schurr <[email protected]>
PeterChen13579 added a commit to XRPLF/clio that referenced this pull request Aug 27, 2024
Fixes [#1497](#1497)
Mimics the behavior of the [fix on Rippled
side](XRPLF/rippled#5045)
PeterChen13579 added a commit to XRPLF/clio that referenced this pull request Aug 27, 2024
Fixes [#1497](#1497)
Mimics the behavior of the [fix on Rippled
side](XRPLF/rippled#5045)
PeterChen13579 added a commit to XRPLF/clio that referenced this pull request Aug 27, 2024
Fixes [#1497](#1497)
Mimics the behavior of the [fix on Rippled
side](XRPLF/rippled#5045)
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.

"account_nfts" with unassociated marker is returning account_nfts instead of error.
5 participants