-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Refactor: Move ledger code to its own subfolder #6780
Comments
cc: @alessio |
IMHO Ledger-related amount of code is too small for it to justify the creation of another directory (ref: https://about.sourcegraph.com/go/idiomatic-go#tiny-package-syndrome) |
The point of the tiny-package syndrome was to argue that 1-2 file large packages aren't a great idea in some cases. Here the ledger code is the majority of the directory, which is unexpected functionality imo of this top level dir. Its responsiblity at the moment is Handling encoding of things to disk (armor*.go), handling encoding of go objects for the sub-directories (amino.go, test_encoding.go), explaining what its sub-directories do (bcrypt_readme), and oddly handling all ledger logic. Feels like packaging the ledger logic is good for modularity, but its up to the repo maintainers. |
OK, I think you have a point @ValarDragon. I'll take care of the migration shortly |
crypto -> crypto/ledger: - crypto.LedgerShowAddress -> ledger.ShowAddress - crypto.NewPrivKeyLedgerSecp256k1 - > ledger.NewPrivKeySecp256k1 - crypto.NewPrivKeyLedgerSecp256k1Unsafe -> ledger.NewPrivKeySecp256k1Unsafe Closes: #6780
crypto -> crypto/ledger: - crypto.LedgerShowAddress -> ledger.ShowAddress - crypto.NewPrivKeyLedgerSecp256k1 - > ledger.NewPrivKeySecp256k1 - crypto.NewPrivKeyLedgerSecp256k1Unsafe -> ledger.NewPrivKeySecp256k1Unsafe Closes: #6780
Thanks! |
Summary
Currently there are 5 files related to the ledger in
/crypto
. A minor change that I think improves overall codestructure would be to move all of these to their own subfolder/crypto/ledger
.For Admin Use
The text was updated successfully, but these errors were encountered: