Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Refactor: Use ES6 classes and extends keyword instead of util.inherits #44

Closed
holgerd77 opened this issue Apr 26, 2018 · 5 comments
Closed

Comments

@holgerd77
Copy link
Member

The current way the different Trie class objects are constructed is not very readable, furthermore the use of util.inherits in Node is discouraged.

This should be reworked to use ES6 classes, constructors together with the extends keyword to inherit properties and methods.

@alextsg
Copy link
Contributor

alextsg commented Sep 26, 2018

I can take a look at this

@holgerd77
Copy link
Member Author

Hi Alex, just discovered that people are working on a pretty interesting and advanced fork of this library. Have started a discussion on that here: #54.

Maybe wait with this, would like to see where we are going there. If you want, you can also have a look at the fork from RainBlock, I think it should be possible to take many of the changes done there back into the library here.

@alextsg
Copy link
Contributor

alextsg commented Sep 27, 2018

Ah ok. Thanks for the heads up @holgerd77

@s1na
Copy link
Contributor

s1na commented Jan 10, 2019

Thanks to @alextsg, most of the library has been ported to ES6 classes in #57 and #61. What remains now is trieNode. I was also wondering as to the purpose of secureInterface and checkpointInterface, why are they not implemented in SecureTrie and CheckpointTrie respectively?

@s1na
Copy link
Contributor

s1na commented Jan 22, 2019

The whole code base has been now ported to ES6 classes, see #57, #61, #71 and #73.

@s1na s1na closed this as completed Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants