harningt / atomun-mnemonic

Java component library containing mnemonic<->byte logic.
Apache License 2.0
5 stars 0 forks source link

Implement an optimal "round-trip" style generator method #8

Closed harningt closed 9 years ago

harningt commented 9 years ago

In a feature branch is a generateUnit method that takes the output of generate and passes it through the decoding method. This is simple, stupid, and slow because we already have some information at the lower levels to fill in the blanks without divining them.

The fix would likely be an SPI addition to the generator methods to spit out a MnemonicUnit at that level rather than higher up... Though we wouldn't want to remove the dumb method as it provides a nice backup.

harningt commented 9 years ago

Implemented in 2caa331f312cd2aa385278baa2c8a2a645d6070a

Easier to pull in earlier due to potential API ripples... which did happen internally with the SPI.