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 duplicate results in get_key_references #1795

Merged
merged 1 commit into from
Jun 14, 2019

Conversation

oxarbitrage
Copy link
Member

Pull for #1209

The issue is also part of #1753

I think we should work in the dupes here while leaving #1753 for pagination.

This pull request implements flat_set as described by @abitmore here #1753 (comment) to solve the issue.

@abitmore abitmore added this to the 3.2.0 - Feature Release milestone Jun 13, 2019
@abitmore
Copy link
Member

I think it's better to create a special test case for reproducing and fixing the duplicates.

@oxarbitrage
Copy link
Member Author

Ill add, i tested in a live chain and it worked(duplicates were gone), but agree test cases will be the best.

@abitmore
Copy link
Member

Hmm. It's a simple change, perhaps writing a test case is not worth the efforts.

@oxarbitrage
Copy link
Member Author

Yes, it is not that easy to create a test case for this. If we can leave that we save some time unless it is totally necessary.

By the way here is a sample in the cli_wallet of before:

new >>> get_key_references [BTS5eTPR9wSnWSiTtJNhqheXbjAmvacq5tycn1RU7eixhSuszidMY] 
[[
    "1.2.93139",
    "1.2.93139"
  ]
]

And after:

new >>> get_key_references [BTS5eTPR9wSnWSiTtJNhqheXbjAmvacq5tycn1RU7eixhSuszidMY] 
[[
    "1.2.93139"
  ]
]
new >>>

The API call after fix:

oxarbitrage@oxarbitrage-Lenovo-ideapad-320S-14IKB:~$ curl --silent -d '{"id":1,"method":"call","params":["database","get_key_references",[["BTS5eTPR9wSnWSiTtJNhqheXbjAmvacq5tycn1RU7eixhSuszidMY"]]]}' http://127.0.0.1:8090/ws | jq
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    [
      "1.2.93139"
    ]
  ]
}
oxarbitrage@oxarbitrage-Lenovo-ideapad-320S-14IKB:~$ 

@oxarbitrage oxarbitrage merged commit 2f7c2ea into bitshares:develop Jun 14, 2019
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.

2 participants