rpc: Backport scantxoutset command#2778
Closed
tecnovert wants to merge 1 commit intoPIVX-Project:masterfrom
Closed
rpc: Backport scantxoutset command#2778tecnovert wants to merge 1 commit intoPIVX-Project:masterfrom
tecnovert wants to merge 1 commit intoPIVX-Project:masterfrom
Conversation
Author
|
Should I close this PR? |
Collaborator
Fuzzbawls
added a commit
that referenced
this pull request
Nov 20, 2022
fe55859 Add functional test for scantxoutset (PeterL73) 4452207 Remove commented out code (PeterL73) c5ba307 Backport scantxoutset and descriptors from BitCoin Core v0.17.2 (PeterL73) Pull request description: ## Issue being fixed or feature implemented As I didn't like the idea of backporting partial functionality of an upstream feature I looked at how `scantxoutset` and descriptors where implemented in BitCoin Core. Thanks to @tecnovert in #2778 I was able to easily locate the introduction point of `scantxoutset` and descriptors into BitCoin Core. As there were only a few files involved I tried to backport the complete functionality from [BitCoin Core v0.17.2](https://github.com/bitcoin/bitcoin/tree/v0.17.2). ## What was done - added `script/descriptor.cpp` and `script/descriptor.h` from BitCoin Core - removed non PIVX compatible code from `script/descriptor.cpp` - changed `#include <util.h>` to `#include <util/system.h>` - removed wpkh, wsh support - added `scantxoutset` related code to `rpc/blockchain.cpp` and `rpc/client.cpp` - made some minor adjustments in backported code in `rpc/blockchain.cpp` - changed `HexStr` call used for outputting scriptPubKey - removed P2WPKH references from the help description - changed _xpub/xprv_ to _DRKV/DRKP_ as prefix for extended keys in the help description - added SigningProvider related code to `script/sign.cpp` and `script/sign.h` - added the functional test `rpc_scantxoutset.py` from BitCoin Core - changed the addresses and keys to fit PIVX requirements - changed the first of the "non HD unspent outputs" tests from 0.002 to 0.007, because PIVX does not have P2SH_SEGWIT or BECH32 addresses only LEGACY addresses are used in this test - dashpay@4127918 ## How Has This Been Tested This was tested using pivx-cli and pivx-qt, by scanning for unspent transaction output with different descriptors and with the functional test. ## Breaking Changes ACKs for top commit: tecnovert: tACK fe55859 Liquid369: tACK fe55859 Fuzzbawls: ACK fe55859 Tree-SHA512: a2b57706e98d8ea8794f7e85eedab3e55546e3e6ec813ed5a784bbbc4071a34dc3cce2861374cd74c5bf20097676163bb100be309121b595b89395d90a7588d8
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport the scantxoutset rpc command from Bitcoin v17
https://github.com/bitcoin/bitcoin/blob/v0.17.0/doc/release-notes.md
Included only as much of the Descriptors code as required for scantxoutset to function.