Skip to content

Easier sort order#274

Merged
ca333 merged 6 commits intoGLEECBTC:devfrom
TheComputerGenie:master
Jan 28, 2020
Merged

Easier sort order#274
ca333 merged 6 commits intoGLEECBTC:devfrom
TheComputerGenie:master

Conversation

@TheComputerGenie
Copy link
Copy Markdown

Alphabetized to make manually finding chains easier.

@ca333 ca333 changed the base branch from master to dev January 22, 2020 15:22
@tonymorony
Copy link
Copy Markdown

Looks good! I propose to do the same for src/assetchains.old script. Can add the commit if everybody agree.
Also there is https://github.com/KomodoPlatform/komodo/blob/master/src/ac.json file which looks like copy of https://github.com/KomodoPlatform/komodo/blob/master/src/assetchains.json.
I wonder if we can delete this duplicate file?

@himu007
Copy link
Copy Markdown

himu007 commented Jan 22, 2020

@tonymorony The contents of assetchains.old file are basically added over the time at the bottom. That file contents shows when a coin was added or which coin came before which. Like a history.

assetchains.json file is being used by listassetchains script in the same dir which gets triggered by add_coins script from dPoW repo. add_coins script is being called from inside m_notary_KMD script.

@tonymorony
Copy link
Copy Markdown

tonymorony commented Jan 22, 2020

The contents of assetchains.old file are basically added over the time at the bottom. That file contents shows when a coin was added or which coin came before which. Like a history.

Yes I see but in such case I don't clearly understand why this file is like a history while assetchains.json one is not. You always can track file changes by git.
If we need some assetchains adding/creation change log maybe some separate place (file/repo) is needed for it.

assetchains.json file is being used by listassetchains script in the same dir which gets triggered by add_coins script from dPoW repo. add_coins script is being called from inside m_notary_KMD script.
My proposal was not about assetchains.json file but about ac.json

@himu007
Copy link
Copy Markdown

himu007 commented Jan 22, 2020

The contents of assetchains.old file are basically added over the time at the bottom. That file contents shows when a coin was added or which coin came before which. Like a history.

Yes I see but in such case I don't clearly understand why this file is like a history while assetchains.json one is not. You always can track file changes by git.
If we need some assetchains adding/creation change log maybe some separate place (file/repo) is needed for it.

assetchains.json file is being used by listassetchains script in the same dir which gets triggered by add_coins script from dPoW repo. add_coins script is being called from inside m_notary_KMD script.
My proposal was not about assetchains.json file but about ac.json

My bad. I understood wrong about the ac.json and assetchains.json. There was a notary operator who basically been ranting for long about not having an ac.json file with proper JSON formatting. Then, @smk762 created this file. Maybe the ac.json can be removed.

And, assetchains.json file was following the assetchains.old file in terms of coin lists. But, @TheComputerGenie now wants it sorted a-z. If you want, you can alphabetize assetchains.old file as well.

@tonymorony
Copy link
Copy Markdown

Yeah, I just mean that if one is sorted logically second should be sorted as well. If we want to keep it in historial order - so maybe better to keep it for both.

My bad. I understood wrong about the ac.json and assetchains.json. There was a notary operator who basically been ranting for long about not having an ac.json file with proper JSON formatting. Then, @smk762 created this file. Maybe the ac.json can be removed.

I see - so if only one operator need it maybe he can sync this file on his own. Because now on new chain adding/removal we need to change two almost the same files assetchains.json and ac.json with unclear benefits what is it not a big deal for sure but such little things might create overall mess (just imo).

@smk762
Copy link
Copy Markdown

smk762 commented Jan 22, 2020

dwy complained about it for days, so I made a PR to demonstrate how much faster it was than complaining. As far as I am aware, it is not in use by any internal scripts, and any half decent dev should be able to remap the json if required.

@smk762
Copy link
Copy Markdown

smk762 commented Jan 22, 2020

fwiw, I alphabeticised the coins file last year while working with mm2, and it was rejected due to being too much of a hassle to review - again, remapping the json on the fly as required is not too difficult.

ticker_names = list(data.keys())
ticker_names.sort()

@ca333
Copy link
Copy Markdown

ca333 commented Jan 23, 2020

If we want to keep it in historial order - so maybe better to keep it for both.

no - alphabetical sequence makes sense. Just cuz a coin is listed at position N doesn't prove it was the Nth added coin.

You always can track file changes by git.

exactly - we should always use git commit history for this tracking - which is more reliable

@TheComputerGenie
Copy link
Copy Markdown
Author

#275
that can be its own issue now

@ca333 ca333 merged commit 82ffadc into GLEECBTC:dev Jan 28, 2020
who-biz pushed a commit to who-biz/komodo that referenced this pull request Jul 29, 2024
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.

5 participants