-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[tests] Move deterministic address import to setup_nodes #14631
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
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK ef91935ad045b60017924c990983bc0474f26ec0. I only superficially understand this change, but it seems to do what's described and simplify things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe needs comment. Why override if just calling super?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops. vestigial from a previous version. Removed.
This requires a small changes to a few tests, but means that deterministic addresses will always be imported (unless setup_nodes behaviour is explicitly overridden).
ef91935 to
3fd7e76
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 3fd7e76, only change since last review is removing unneeded override.
|
utACK 3fd7e76 |
3fd7e76 [tests] Move deterministic address import to setup_nodes (John Newbery) Pull request description: This requires a small changes to a few tests, but means that deterministic addresses will always be imported (unless setup_nodes behaviour is explicitly overridden). Tidies up the way we import deterministic addresses, requested in review comment here: #14468 (comment). Tree-SHA512: 2b32edf500e286c463398487ab1153116a1dc90f64a53614716373311abdc83d8a251fdd8f42d1146b56e308664deaf62952113f66e98bc37f23968096d1a961
Summary: Adds a generate() method to the TestNode class in the test framework. This method intercepts calls to generate, imports a dewterministic private key to the node and then calls generatetoaddress to generate the block to that address. Note that repeated calls to importprivkey for the same private keys are no-ops, so it's fine to call the generate() method many times. This is a partial backport of Core [[bitcoin/bitcoin#14468 | PR14468]] : bitcoin/bitcoin@aab8172 The code was slightly tweaked because we have some tests for which `self.rpc` is `None` because they've been created after [[bitcoin/bitcoin#14631 | PR14631]] which remove the call to importprivkey Depends on D5969 Test Plan: ninja all check-all Reviewers: #bitcoin_abc, majcosta Reviewed By: majcosta Differential Revision: https://reviews.bitcoinabc.org/D5970
Summary: This requires a small changes to a few tests, but means that deterministic addresses will always be imported (unless setup_nodes behaviour is explicitly overridden). This is a backport of Core [[bitcoin/bitcoin#14631 | PR14631]] Depends on D5972 Test Plan: ninja all check-all Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Subscribers: majcosta, Fabien Differential Revision: https://reviews.bitcoinabc.org/D5973
This requires a small changes to a few tests, but means that
deterministic addresses will always be imported (unless setup_nodes
behaviour is explicitly overridden).
Tidies up the way we import deterministic addresses, requested in review comment here: #14468 (comment).