Closed freman closed 6 years ago
Hey great idea :) Looks good - but let me do a quick test of it to be safe :)
However I had a thought. Even with this you have to change the consts. Given your use case, what do you think about allowing these to be made public or providing setters? Then you wouldn't need to keep a fork of the lib?
Hehe please double check my work, given how busy we've been I wouldn't be surprised if I made a simple oversight.
In our work, they're still constants, we never want to change them, we literally just changed nodeBits to 7 It'd cause chaos if everyone could change it depending on their mood for a given project (or series of microservices)
Oh, after some sleep, I see what you're saying.
Yes, setters would be a good idea, just so long as the defaults remain compatible with the original right? :D
Yeah, definitely keep the defaults the same, but this way you won't need to modify the code at all. You can just use a setter to make the changes you need for your project.
We've got a fork of this where we change the number of node/host bits to 7, by adding some more constants the change is almost fully automagic.