-
Notifications
You must be signed in to change notification settings - Fork 38.7k
tests: move generate_wif_key to wallet_util.py #19239
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
Conversation
This reverts commit c75de5d.
generate_wif_key is a wallet utility function. Move it from the EC key module to the wallet util module.
|
requesting review from @laanwj and @MarcoFalke |
|
Concept ACK on moving wif to wallet_util, but it was simply not clear to me that base58 is not allowed to be moved into its own module. I think in the past we had more issues due to files being used for too much (main.cpp, util.cpp, ...) than files being used for too little. The question might be stylistic, so I will refrain from having an opinion. I am fine with keeping base58 in a separate module or moving it back. |
|
ACK on moving the wif key functions elsewhere. I don't understand what the problem is with base58 being its own module, though. It's used by both addresses and wifs, so it doesn't logically belong in an address module imho. |
|
ACK with or without revert commit. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
ACK, checked that the base58 import is removed from key.py. Still no opinion on whether base58 should be its own module, but the diff here has minimal risk of breaking anything. With two ACKs without commit hash (presumably Concept ACKS?), this seems good to merge. ACK 3a83a01 🍪 git diff e380818~2 e380818 # Empty diff Show signature and timestampSignature: Timestamp of file with hash |
No problem, but I think ideally base58, bech32 and higher abstract level address functionality could all exist in the same module with no issues. base58 is used almost nowhere apart from addresses (wallet import format is the one exception I can think of) and similarly for bech32. There's already confusion between the different modules (why is |
|
Generally, as long as we don't have a guideline of how the test framework classes should be structured into modules, I consider the specifics to be of stylistic nature. (Stylistic specifics are completely up to the author of the commit to decide on. Stylistic feedback may be accepted from reviewers, but it is also valid to simply reject stylistic feedback) I wouldn't mind merging address and segwit_addr into one module or whatever else is decided to be done. Though, as long as there is no guideline, we shouldn't classify changes concerning modularization as right vs. wrong. |
3a83a01 [tests] move generate_wif_key to wallet_util.py (John Newbery) b216b0b [tests] sort imports in rpc_createmultisig.py (John Newbery) e380818 Revert "[TESTS] Move base58 to own module to break circular dependency" (John Newbery) Pull request description: generate_wif_key is a wallet utility function. Move it from the EC key module to the wallet util module. This fixes the circular dependency issue in bitcoin#17977 ACKs for top commit: MarcoFalke: ACK 3a83a01 🍪 Tree-SHA512: 24985dffb75202721ccc0c6c5b52f1fa5d1ce7963bccde24389feb913cab4dad0c265274ca67892c46c8b64e6a065a0f23263a89be4fb9134dfefbdbe5c7238a
Summary: generate_wif_key is a wallet utility function. Move it from the EC key module to the wallet util module. This is a backport of [[bitcoin/bitcoin#19239 | core#19239]] Backport note: the revert commit is not relevant, we haven't backported [[bitcoin/bitcoin#19230 | core#19230]] Test Plan: `ninja check-functional-extended` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9934
generate_wif_key is a wallet utility function. Move it from the EC key module to the wallet util module.
This fixes the circular dependency issue in #17977