Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Aug 19, 2021

This is needed for #22567.

By making the calls to generate* member function of the test framework, it paves the way to make it easier to implicitly call the sync_all member function.

@fanquake fanquake added the Tests label Aug 19, 2021
@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 19, 2021

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #22543 (test: Use MiniWallet in mempool_limit.py by ShubhamPalriwala)
  • #21862 (test: Set regtest.BIP65Height = 111 to speed up tests by MarcoFalke)

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.

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

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

My intention when creating TestNode was that it would be a batteries included programmatic API to the node. It's used by the test framework, but can easily be reused for manual testing, stress testing, etc, since it has no dependencies on the framework. I've personally used it to control a mainnet node with a few tweaks.

This branch introduces a dependency from MiniWallet on TestFramework. I think that's a shame, since it'd be nice if MiniWallet could be used independently from the test framework for things like manual testing, like TestNode can.

I've made a slight modification to this branch here: https://github.com/jnewbery/bitcoin/tree/pr22741.1 which doesn't add that dependency. Let me know what you think.

@@ -445,10 +445,10 @@ def find_output(node, txid, amount, *, blockhash=None):

# Helper to create at least "count" utxos
# Pass in a fee that is sufficient for relay and mining new transactions.
def create_confirmed_utxos(fee, node, count):
def create_confirmed_utxos(test_framework, fee, node, count):
Copy link
Contributor

Choose a reason for hiding this comment

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

It feels slightly strange passing the TestFramework object into these functions in util.py.

Hopefully longer term, create_confirmed_utxos() will be replaced by a miniwallet function, and mine_large_block() and generate_to_height() can be moved to the single files that use those functions.

Copy link
Member Author

Choose a reason for hiding this comment

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

generate_to_height is removed, but the others remain for now

Copy link
Member Author

@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.

Thanks @jnewbery. I've pushed your branch and left a nit comment.

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

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

utACK fa855ae

The changes in feature_rbf can be reviewed with
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
@jnewbery
Copy link
Contributor

utACK fab2e23

@fanquake fanquake merged commit eb09c26 into bitcoin:master Aug 24, 2021
@maflcko maflcko deleted the 2108-testSync01 branch August 24, 2021 08:32
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 24, 2021
Vasundhara383 pushed a commit to Vasundhara383/bitcoincash that referenced this pull request Apr 6, 2022
Summary
---

This is a backport of bitcoin/bitcoin@faf7e92
See bitcoin/bitcoin#22741

Test plan
---

* `ninja all check-functional`
Vasundhara383 pushed a commit to Vasundhara383/bitcoincash that referenced this pull request Apr 6, 2022
Summary
---

This is a backport of bitcoin/bitcoin@fab2e23
See bitcoin/bitcoin#22741

Test plan
---

* `ninja all check-functional-extended`
@bitcoin bitcoin locked and limited conversation to collaborators Oct 30, 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.

4 participants