[tests] Move deterministic address import to setup_nodes#14631
Merged
maflcko merged 1 commit intobitcoin:masterfrom Nov 2, 2018
Merged
[tests] Move deterministic address import to setup_nodes#14631maflcko merged 1 commit intobitcoin:masterfrom
maflcko merged 1 commit intobitcoin:masterfrom
Conversation
ryanofsky
approved these changes
Nov 1, 2018
Contributor
ryanofsky
left a comment
There was a problem hiding this comment.
utACK ef91935ad045b60017924c990983bc0474f26ec0. I only superficially understand this change, but it seems to do what's described and simplify things.
Contributor
There was a problem hiding this comment.
Maybe needs comment. Why override if just calling super?
Contributor
Author
There was a problem hiding this comment.
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
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
Member
|
utACK 3fd7e76 |
maflcko
pushed a commit
that referenced
this pull request
Nov 2, 2018
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
deadalnix
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
May 6, 2020
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
deadalnix
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
May 6, 2020
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).