-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Bitcoin wallet PRs 3 #4271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Bitcoin wallet PRs 3 #4271
Conversation
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
Before this, if someone imported a scriptPubKey directly (in hex form) using importaddress, outputs sending to it would be treated as change, as the corresponding CTxDestination was not added to the address book. Fix this by trying to detect scriptPubKeys that are in fact convertible to a CTxDestination and add them anyway. Add a warning to the RPC help to warn against importing raw non-standard scripts.
Zcash: Excluding unit tests for SegWit logic.
Does not test watch-only addresses. Zcash: Excluding SegWit tests and isInvalid code (which is part of the SegWit support structure).
Zcash: Excludes changes to importwallet (missing bitcoin/bitcoin#11667) and ProcessImport (missing bitcoin/bitcoin#7551).
Only IsMine's internal code needs this, as part of a recursion into P2SH and P2WSH scripts. The exposed functions always operate on actual scriptPubKeys and not on redeemScripts or witness scripts. Zcash: Rewrote this commit so that it instead adds an internal SigVersion argument (which we didn't have because it was added to support SegWit logic). Co-authored-by: Jack Grigg <[email protected]>
This will allow us to have the consensus code and IsMine code diverge.
Inside IsMine we care about the distinction between scriptPubKey execution and P2SH redeemScript execution. The consensus code does not care about this distinction, and thus SigVersion does not have a field for P2SH. As the IsMine code will care, it uses a separate enum with more fields.
Such outputs can still be watched, and signed for, but they aren't treated as valid payments. That means they won't cause transactions to appear in listtransactions, their outputs to be shown under listunspent, or affect balances.
ebfull
approved these changes
Dec 19, 2019
Contributor
|
@zkbot r+ |
Contributor
|
📌 Commit 82eefce has been approved by |
Contributor
zkbot
added a commit
that referenced
this pull request
Dec 19, 2019
Bitcoin wallet PRs 3 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#7687 - bitcoin/bitcoin#11116 - Excludes SegWit tests - Excludes `isInvalid` code (which is part of the SegWit support structure) - bitcoin/bitcoin#13002 - Excludes changes to `importwallet` (missing bitcoin/bitcoin#11667) - Excludes changes to `ProcessImport` (missing bitcoin/bitcoin#7551) - Third commit was rewritten to add an internal SigVersion argument (which we didn't have because it was added to support SegWit logic).
Contributor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-wallet
Area: Wallet
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
C-upstream-port
Category: Changes that are ported from the Bitcoin Core codebase.
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.
Cherry-picked from the following upstream PRs:
isInvalidcode (which is part of the SegWit support structure)importwallet(missing Add scripts to dumpwallet RPC bitcoin/bitcoin#11667)ProcessImport(missing Add importmulti RPC call bitcoin/bitcoin#7551)