RPC: Backport scantxoutset from BitCoin Core v0.17.2#2780
Merged
Fuzzbawls merged 3 commits intoPIVX-Project:masterfrom Nov 20, 2022
Merged
RPC: Backport scantxoutset from BitCoin Core v0.17.2#2780Fuzzbawls merged 3 commits intoPIVX-Project:masterfrom
Fuzzbawls merged 3 commits intoPIVX-Project:masterfrom
Conversation
- commented out non PIVX code in descriptor.cpp - added scantxoutset related code to rpc/blockchain.cpp and rpc/client.cpp - made some minor adjustments in BitCoins code (call to HexStr and help description) in rpc/blockchain.cpp - added SigningProvider related code to script/sign.cpp and script/sign.h
- changed the addresses and keys to fit PIVX requirments - changed the first non HD unspent outputs test from 0.002 to 0.007, because PIVX does not have P2SH_SEGWIT and BECH32 addresses, only LEGACY are tested here
d57a9da to
fe55859
Compare
Collaborator
|
@tecnovert, since this supersedes your PR and is intended to suit your particular use case / implementation, would you please give it a review / approval? |
|
tACK fe55859 I've compiled this branch and verified that the functional test rpc_scantxoutset passes. |
tecnovert
approved these changes
Nov 16, 2022
Liquid369
approved these changes
Nov 17, 2022
Member
There was a problem hiding this comment.
tACK fe55859
Compiled and compared to bitcoin:bitcoin#12196 and bitcoin:bitcoin#13697
Tested and runs as expected.
Fuzzbawls
approved these changes
Nov 18, 2022
Fuzzbawls
pushed a commit
to Fuzzbawls/PIVX
that referenced
this pull request
Nov 22, 2022
- commented out non PIVX code in descriptor.cpp - added scantxoutset related code to rpc/blockchain.cpp and rpc/client.cpp - made some minor adjustments in BitCoins code (call to HexStr and help description) in rpc/blockchain.cpp - added SigningProvider related code to script/sign.cpp and script/sign.h Github-Pull: PIVX-Project#2780 Rebased-From: c5ba307
Fuzzbawls
pushed a commit
to Fuzzbawls/PIVX
that referenced
this pull request
Nov 22, 2022
Github-Pull: PIVX-Project#2780 Rebased-From: 4452207
Fuzzbawls
pushed a commit
to Fuzzbawls/PIVX
that referenced
this pull request
Nov 22, 2022
- changed the addresses and keys to fit PIVX requirments - changed the first non HD unspent outputs test from 0.002 to 0.007, because PIVX does not have P2SH_SEGWIT and BECH32 addresses, only LEGACY are tested here Github-Pull: PIVX-Project#2780 Rebased-From: fe55859
Merged
Fuzzbawls
added a commit
that referenced
this pull request
Dec 12, 2022
c0f6055 [Consensus] Bump v5.5 activation height for mainnet (Fuzzbawls) 200b908 [Consensus] Set v5.5 activation height for mainnet (Fuzzbawls) dc31cef Add functional test for scantxoutset (PeterL73) b452fb6 Remove commented out code (PeterL73) 3fc2e6b Backport scantxoutset and descriptors from BitCoin Core v0.17.2 (PeterL73) 8f5f52d Remove semicolon and add "verbose" back to vRPCConvertParams. (tecnovert) ba310d1 Test for hex strings and remove stray newline from rpc_named_arguments. (tecnovert) 2b244ba Fix missing help text and add backwards compatibility. (tecnovert) cce6951 rpc: Backport getblock verbosity (tecnovert) fd719a2 add include_delegated to vRPCConvertParams (PeterL73) d285af0 use block height from caller (PeterL73) Pull request description: Backports the following PRs to the `5.5` branch: #2772 #2774 #2779 #2780 #2781 #2784 Top commit has no ACKs. Tree-SHA512: b0858e8ce7a39a1a3399fb2cf3eb4c4e77ecd526d9c8ca38fab0dc1ca6d108c962a581c8e481d8ac584a35b8a88f58d9d887166a35aec8fdfb66e8d57232dfa8
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.
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
scantxoutsetand descriptors where implemented in BitCoin Core. Thanks to @tecnovert in #2778 I was able to easily locate the introduction point ofscantxoutsetand 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.What was done
script/descriptor.cppandscript/descriptor.hfrom BitCoin Corescript/descriptor.cpp#include <util.h>to#include <util/system.h>scantxoutsetrelated code torpc/blockchain.cppandrpc/client.cpprpc/blockchain.cppHexStrcall used for outputting scriptPubKeyscript/sign.cppandscript/sign.hrpc_scantxoutset.pyfrom BitCoin CoreHow 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