Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

(CRO-677) Problem: The result of the list address API is not ordered by creation order #777

Closed
landanhu opened this issue Dec 29, 2019 · 1 comment
Assignees

Comments

@landanhu
Copy link
Contributor

The address list returned by the client should be ordered stable, e.g. by creation order.

Python integration tests use address list API to get the bonded/unbonded stacking address, it’s not stable with current API.

yihuang added a commit to yihuang/chain that referenced this issue Jan 20, 2020
… stable

Solution:
- change `staking_keys`/`root_hashes` from `BTreeSet` to `Vec`
yihuang added a commit to yihuang/chain that referenced this issue Jan 20, 2020
… stable

Solution:
- change `staking_keys`/`root_hashes` from `BTreeSet` to `Vec`
@yihuang
Copy link
Collaborator

yihuang commented Jan 20, 2020

The title should be: The result of the list address API is not ordered by creation order.

When a new address added, the whole list gets re-ordered.
It's not intuitive and affects integration test scripts that want to use the API to get some specific address.

bors bot added a commit that referenced this issue Jan 20, 2020
928: Problem (Fix #777): Order of client list address api is not sorted by creation order. r=tomtau a=yihuang

Solution:
- change `BTreeSet` to `IndexSet`

This is required by new integration tests, also more intuitive to user.

Co-authored-by: yihuang <[email protected]>
@tomtau tomtau changed the title (CRO-677) Problem: Order of client list address api is not stable (CRO-677) Problem: The result of the list address API is not ordered by creation order Jan 20, 2020
@bors bors bot closed this as completed in 5e9cfed Jan 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants