Skip to content

Conversation

@theStack
Copy link
Contributor

The functional test feature_rbf.py currently fails on master branch, if descriptor wallets are used (argument --descriptors). This is due to the fact that in this case, a call to the helper init_wallet

def init_wallet(self, *, node):
wallet_name = self.default_wallet_name if self.wallet_names is None else self.wallet_names[node] if node < len(self.wallet_names) else False
if wallet_name is not False:
n = self.nodes[node]
if wallet_name is not None:
n.createwallet(wallet_name=wallet_name, descriptors=self.options.descriptors, load_on_startup=True)
n.importprivkey(privkey=n.get_deterministic_priv_key().key, label='coinbase')

creates a wallet without rescanning the blockchain; the test framework maps the importprivkey RPC calls to the importdescriptors RPC without rescanning by default (timestamp='now'). Fix this by always calling with rescan=True, which calls importdescriptors with timestamp=0. Also add feature_rbf.py --descriptors to the list of the test runner's calls.

Fixes #23563.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, thanks.

@DrahtBot DrahtBot added the Tests label Nov 26, 2021
@mjdietzx
Copy link
Contributor

ACK b79dbe8

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #21085 (test: enable self.chain = 'main' to work in python bitcoin test framework by Saibato)

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.

@fanquake fanquake merged commit 4f8b1f8 into bitcoin:master Nov 28, 2021
@theStack theStack deleted the 202111-test-fix-feature_rbf-for-descriptor-wallets branch November 28, 2021 10:46
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Nov 29, 2021
… to test runner

b79dbe8 test: add feature_rbf.py --descriptors to test_runner.py (Sebastian Falbesoner)
166f8ec test: always rescan after importing private keys in `init_wallet` helper (Sebastian Falbesoner)

Pull request description:

  The functional test feature_rbf.py currently fails on master branch, if descriptor wallets are used (argument `--descriptors`). This is due to the fact that in this case, a call to the helper `init_wallet`

  https://github.com/bitcoin/bitcoin/blob/111c3e06b35b7867f2e0f740e988f648ac6c325d/test/functional/test_framework/test_framework.py#L428-L434

  creates a wallet without rescanning the blockchain; the test framework maps the importprivkey RPC calls to the importdescriptors RPC without rescanning by default (timestamp='now'). Fix this by always calling with `rescan=True`, which calls importdescriptors with timestamp=0. Also add `feature_rbf.py --descriptors` to the list of the test runner's calls.

  Fixes bitcoin#23563.

ACKs for top commit:
  mjdietzx:
    ACK b79dbe8

Tree-SHA512: a3f3f7a4077066e3c910919d3b5e04bc6b580c1e0a06e9a2fc258950eaea5e59c0f805c8f00432aea722609f2f7e41eebfab653471b76729c5a316825a3d8c86
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this pull request Dec 23, 2021
… and add to test runner

0d56e1f test: add feature_rbf.py --descriptors to test_runner.py (Sebastian Falbesoner)
ee89b09 test: always rescan after importing private keys in `init_wallet` helper (Sebastian Falbesoner)

Pull request description:

  The functional test feature_rbf.py currently fails on master branch, if descriptor wallets are used (argument `--descriptors`). This is due to the fact that in this case, a call to the helper `init_wallet`

  https://github.com/bitcoin/bitcoin/blob/e475dd3b063f0badc2a0a4b036741d7e1d6f7f16/test/functional/test_framework/test_framework.py#L428-L434

  creates a wallet without rescanning the blockchain; the test framework maps the importprivkey RPC calls to the importdescriptors RPC without rescanning by default (timestamp='now'). Fix this by always calling with `rescan=True`, which calls importdescriptors with timestamp=0. Also add `feature_rbf.py --descriptors` to the list of the test runner's calls.

  Fixes #23563.

ACKs for top commit:
  mjdietzx:
    ACK 0d56e1f

Tree-SHA512: a3f3f7a4077066e3c910919d3b5e04bc6b580c1e0a06e9a2fc258950eaea5e59c0f805c8f00432aea722609f2f7e41eebfab653471b76729c5a316825a3d8c86
@bitcoin bitcoin locked and limited conversation to collaborators Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: failure in test/functional/feature_rbf.py with --without-bdb

5 participants