-
Notifications
You must be signed in to change notification settings - Fork 99
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
Separate KOMODO_STATES and CURRENCIES #484
Conversation
eaadadc
to
741e4ec
Compare
I think these changes are great, however as they touch the notary code I'd suggest someone tries them on a NN node (@DeckerSU) |
probably this PR will need to be rebased after jmj_npoints is merged (f.e. it still uses sp->NUM_NPOINTS replaced on NPOINTS.size() in the jmj_npoints) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look great and there are tests for them but I still suggest a NN operator would try to use them and check for correct work (absence of errors in logs and console)
I agree with @dimxy , changes looks very good, but before detail review and logic check i should mention one thing, currencies array:
Is related to PAX "stable-coins" experiment. So, all the code related to these PAX currencies (except KMD of course) is abandoned and will not ever used anymore. My personal feeling of this case - we should carefully remove all PAX related code from daemon, instead of trying to refactor corresponding sources. Probably @ca333 will have other vision, so what about this PR - we should discuss it first, to find a consensus. My humble opinion and vision, as i said, we should carefully remove all PAX related code from daemon, for this PR it will mean to have only one |
If PAX code is indeed dead code, my vote would be to close or delay merging this PR, and scope-creep this into a "Remove PAX" PR. Update: See PR #551 |
Given that we're giving up on LABS, shouldn't that come out too? |
Closed in favor of #551 |
Part of #479
The existing code looks up a pointer to
komodo_state
in an array, indexed byCURRENCIES
.This PR breaks that link, allowing the collection of komodo_state objects to
This PR also
CURRENCIES
array behind a method. `komodo_currency(uint8_t) will return the currency symbol of a particular index.komodo_stateptr
(getting the symbol and the pointer) into two methods. This allows methods that do not need thesymbol
anddest
values to not create variables for them.komodo_stateptr
to give it the functionality ofkomodo_stateptrget
. This provides a unified interface.komodo_stateptr()
now returns a pointer to komodo_state for the default chain.komodo_stateptr(char *)
now returns a pointer to komodo_state for the passed-in symbol.komodo_nameset(char*, char*, const char*)
can be used to set thesymbol
anddest
askomodo_stateptr
used to.Note: It seems the
pax_
routines use the currency array quite a bit. I am unsure of the functionality of this code. This area should be tested heavily to assure no functionality is broken.