forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2780: RPC: Backport scantxoutset from BitCoin Core v0.17.2
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
- Loading branch information
Showing
10 changed files
with
994 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.