Skip to content

Commit

Permalink
Merge #5907: fix: actually run rpc_fundrawtransaction with and withou…
Browse files Browse the repository at this point in the history
…t HD feature

a392be6 fix: actually run rpc_fundrawtransaction with and without HD feature (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Due to double initialization of `extra_args` rpc_fundrawtransaction always test with enabled or disabled HD wallets (which is enabled by default).

  ## What was done?
  Fixes double initialization and inversion of condition due to hd wallets enabled by default since #5807

  ## How Has This Been Tested?
  Run functional tests and watch `ps aux` during running to ensure that `-usehd` is set properly.

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: 6e595b4073c50f0355d9f64b966b1a0613a7bb8dae3406523fae737e54725ffc652aa9db30daf46c9640d98f44883780bd075074d56b7e8baeeb0a1d2d007c20
  • Loading branch information
PastaPastaPasta committed Mar 4, 2024
2 parents 2f7f678 + a392be6 commit 9d8b06e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions test/functional/rpc_fundrawtransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@ class RawTransactionsTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 4
self.setup_clean_chain = True
self.extra_args = [[f'-usehd={self.options.usehd}']] * self.num_nodes
# This test isn't testing tx relay. Set whitelist on the peers for
# instant tx relay.
self.extra_args = [['-whitelist=noban@127.0.0.1']] * self.num_nodes
self.extra_args = [[f'-usehd={not self.options.nohd}', '-whitelist=noban@127.0.0.1']] * self.num_nodes

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()

def add_options(self, parser):
parser.add_argument("--usehd", dest="usehd", default=False, action="store_true",
help="Test with -usehd enabled")
parser.add_argument("--nohd", dest="nohd", default=False, action="store_true",
help="Test with -nohd enabled")

def setup_network(self):
self.setup_nodes()
Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
'feature_maxuploadtarget.py',
'feature_block.py', # NOTE: needs dash_hash to pass
'rpc_fundrawtransaction.py',
'rpc_fundrawtransaction.py --usehd',
'rpc_fundrawtransaction.py --nohd',
'wallet_multiwallet.py --usecli',
'p2p_quorum_data.py',
# vv Tests less than 2m vv
Expand Down

0 comments on commit 9d8b06e

Please sign in to comment.