Skip to content

Conversation

@danben
Copy link
Contributor

@danben danben commented Feb 10, 2021

This is within the scope of issue #20078.

Changes:

  • Removed skip_if_no_wallet and all uses of wallet RPCs from feature_bip_sequence.py
  • Added new functionality to wallet.py
    • generate_random_outputs, a function that will create a multi-output transaction based on a single utxo in the wallet
    • get_confirmations, a function that returns the number of confirmations for a given (confirmed) utxo
    • get_utxos, a function that removes and returns the last n transactions in the wallet
  • Changed existing functionality in wallet.py
    • send_self_transfer now accepts the following parameters: send_values, nSequence and nVersion
    • send_self_transfer will now create a transaction with multiple outputs, if multiple send_values are specified

@danben
Copy link
Contributor Author

danben commented Feb 10, 2021

I'm still very new to the codebase so I'm sure I did lots of things suboptimally, but this should be a decent starting point.

Thanks for reviewing!

@danben danben force-pushed the test-feature-bip68-sequence-without-wallet branch 2 times, most recently from 0849f80 to e89ee56 Compare February 10, 2021 23:23
@fanquake fanquake added the Tests label Feb 10, 2021
@danben danben changed the title test: convert feature_bip_sequence.py to use MiniWallet test: convert feature_bip68_sequence.py to use MiniWallet Feb 11, 2021
@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 11, 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:

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

@stackman27 stackman27 left a comment

Choose a reason for hiding this comment

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

Left few comments, still reviewing send_self_transfer... Also, I think you should split the commits one for feature_bip68_sequence.py and another for miniwallet

Copy link
Contributor

@stackman27 stackman27 left a comment

Choose a reason for hiding this comment

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

Reviewed send_self_transfer. Also fees_assertion should work now :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Is confirmed= True needed? Seems to be true all the time as of now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's true that I only use this function in feature_bip68_sequence.py to create confirmed outputs, but generate_random_outputs belongs to wallet.py, not a specific functional test. It seems more broadly useful to allow the user to create unconfirmed outputs if they like (and with the amount of tests left to convert I suspect it will come up at some point).

@danben danben force-pushed the test-feature-bip68-sequence-without-wallet branch 2 times, most recently from e89ee56 to 21e12fa Compare February 19, 2021 15:01
This is within the scope of issue bitcoin#20078.
Changes:
 - Removed skip_if_no_wallet and all uses of wallet RPCs from feature_bip_sequence.py
 - Added new functionality to wallet.py
   - generate_random_outputs, a function that will create a multi-output transaction based on a single utxo in the wallet
   - get_confirmations, a function that returns the number of confirmations for a given (confirmed) utxo
   - get_utxos, a function that removes and returns the last n transactions in the wallet
 - Changed existing functionality in wallet.py
   - send_self_transfer now accepts the following parameters: send_values, nSequence and nVersion
   - send_self_transfer will now create a transaction with multiple outputs, if multiple send_values are specified
@danben danben force-pushed the test-feature-bip68-sequence-without-wallet branch from 21e12fa to 520e779 Compare February 19, 2021 16:15
@DrahtBot DrahtBot mentioned this pull request Feb 23, 2021
@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@maflcko
Copy link
Member

maflcko commented Aug 26, 2021

Marked up for grabs, because it still needs rebase

@fanquake fanquake closed this Aug 27, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants