lbrycrd/src
Wladimir J. van der Laan 2f717fb5cd
Merge #15427: Add support for descriptors to utxoupdatepsbt
26fe9b9909 Add support for descriptors to utxoupdatepsbt (Pieter Wuille)
3135c1a2d2 Abstract out UpdatePSBTOutput from FillPSBT (Pieter Wuille)
fb90ec3c33 Abstract out EvalDescriptorStringOrObject from scantxoutset (Pieter Wuille)
eaf4f88734 Abstract out IsSegWitOutput from utxoupdatepsbt (Pieter Wuille)

Pull request description:

  This adds a descriptors argument to the `utxoupdatepsbt` RPC. This means:
  * Input and output scripts and keys will be filled in when known.
  * P2SH-witness inputs will be filled in from the UTXO set when a descriptor is provided that shows they're spending segwit outputs.

  This also moves some (newly) shared code to separate functions: `UpdatePSBTOutput` (an analogue to `SignPSBTInput`), `IsSegWitOutput`, and `EvalDescriptorStringOrObject` (implementing the string or object notation parsing used in `scantxoutset`).

ACKs for top commit:
  jnewbery:
    utACK 26fe9b9909
  laanwj:
    utACK 26fe9b9909 (will hold merging until response to promag's comments)
  promag:
    ACK 26fe9b9, checked refactors and tests look comprehensive. Still missing a release note but can be added later.

Tree-SHA512: 1d833b7351b59d6c5ded6da399ff371a8a2a6ad04c0a8f90e6e46105dc737fa6f2740b1e5340280d59e01f42896c40b720c042f44417e38dfbee6477b894b245
2019-07-02 16:53:22 +02:00
..
bench scripted-diff: Replace fprintf with tfm::format 2019-06-13 10:32:52 -04:00
compat Document assumptions about C++ compiler 2019-03-05 11:19:32 +01:00
config
consensus Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
crypto Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
index scripted-diff: replace chainActive -> ::ChainActive() 2019-05-03 15:02:54 -04:00
interfaces Move ismine to wallet module 2019-06-19 18:06:30 -04:00
leveldb Pull leveldb subtree 2019-01-26 12:45:48 -05:00
node [build] Move AnalyzePSBT from psbt.cpp to node/psbt.cpp 2019-04-09 17:53:08 -04:00
obj
obj-test
policy [wallet] abort when attempting to fund a transaction above maxtxfee 2019-06-28 22:44:38 -04:00
primitives Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
qt [wallet] abort when attempting to fund a transaction above maxtxfee 2019-06-28 22:44:38 -04:00
rpc Merge #15427: Add support for descriptors to utxoupdatepsbt 2019-07-02 16:53:22 +02:00
script Merge #15427: Add support for descriptors to utxoupdatepsbt 2019-07-02 16:53:22 +02:00
secp256k1 Update the secp256k1 subtree to the latest upstream version 2019-03-31 11:41:05 -07:00
support windows: Set _WIN32_WINNT to 0x0601 (Windows 7) 2019-01-23 16:28:27 +08:00
test Merge #14193: validation: Add missing mempool locks 2019-07-02 16:29:08 +02:00
univalue Update univalue subtree 2018-09-07 08:21:14 -04:00
util Merge #16257: [wallet] abort when attempting to fund a transaction above -maxtxfee 2019-07-01 16:03:37 +02:00
wallet Merge #15427: Add support for descriptors to utxoupdatepsbt 2019-07-02 16:53:22 +02:00
zmq Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
.clang-format Fix inconsistent namespace formatting guidelines 2018-04-13 15:37:20 -04:00
addrdb.cpp addrdb: Remove temporary files created in SerializeFileDB. Fixes non-determinism in unit tests. 2019-06-14 08:30:43 +02:00
addrdb.h banman: Add, use CBanEntry ctor that takes ban reason 2019-01-16 13:54:18 -05:00
addrman.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
addrman.h [addrman] Ensure collisions eventually get resolved 2019-02-27 16:53:44 -05:00
amount.h Update copyright headers to 2018 2018-12-29 10:15:01 +01:00
arith_uint256.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
arith_uint256.h Use std::numeric_limits<UNSIGNED>::max()) instead of (UNSIGNED)-1 2018-12-04 19:55:04 +02:00
attributes.h Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool. Sort includes. 2018-11-05 17:03:11 +01:00
banman.cpp Allow connections from misbehavior banned peers. 2019-01-22 21:10:48 +00:00
banman.h Allow connections from misbehavior banned peers. 2019-01-22 21:10:48 +00:00
base58.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
base58.h Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool. Sort includes. 2018-11-05 17:03:11 +01:00
bech32.cpp Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations. 2018-08-27 18:19:33 +02:00
bech32.h Fix missing or inconsistent include guards 2018-03-22 16:23:04 +01:00
bitcoin-cli-res.rc
bitcoin-cli.cpp Replace remaining fprintf with tfm::format manually 2019-06-13 11:46:38 -04:00
bitcoin-tx-res.rc
bitcoin-tx.cpp Replace remaining fprintf with tfm::format manually 2019-06-13 11:46:38 -04:00
bitcoin-wallet-res.rc [tools] Add wallet inspection and modification tool 2019-01-30 16:26:52 -05:00
bitcoin-wallet.cpp scripted-diff: Replace fprintf with tfm::format 2019-06-13 10:32:52 -04:00
bitcoind-res.rc
bitcoind.cpp scripted-diff: Replace fprintf with tfm::format 2019-06-13 10:32:52 -04:00
blockencodings.cpp CorruptionPossible -> BLOCK_MUTATED 2019-05-02 15:14:12 -04:00
blockencodings.h disallow oversized CBlockHeaderAndShortTxIDs 2018-11-13 12:41:41 -08:00
blockfilter.cpp init: Add CLI option to enable block filter index. 2019-04-06 12:10:55 -07:00
blockfilter.h init: Add CLI option to enable block filter index. 2019-04-06 12:10:55 -07:00
bloom.cpp refactor: Improve CRollingBloomFilter::reset by using std::fill 2019-05-22 15:55:50 +01:00
bloom.h Removes unsed CBloomFilter constructor. 2018-08-13 01:24:55 +02:00
chain.cpp refactor: combine Chain::findFirstBlockWithTime/findFirstBlockWithTimeAndHeight 2019-03-27 18:29:48 -04:00
chain.h refactor: combine Chain::findFirstBlockWithTime/findFirstBlockWithTimeAndHeight 2019-03-27 18:29:48 -04:00
chainparams.cpp Update assumevalid, minimumchainwork, and getchaintxstats to height 563378. 2019-02-17 03:38:08 +00:00
chainparams.h implements different disk sizes for different networks on intro 2018-10-07 13:11:36 +01:00
chainparamsbase.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
chainparamsbase.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
chainparamsseeds.h net: Update hardcoded seeds 2018-08-13 13:57:15 +02:00
checkqueue.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
clientversion.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
clientversion.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
coins.cpp Extract CSipHasher to it's own file in crypto/ directory. 2018-11-05 09:25:15 -08:00
coins.h Merge #15267: doc: explain AcceptToMemoryPoolWorker's coins_to_uncache 2019-04-26 13:09:30 -04:00
compat.h windows: Set _WIN32_WINNT to 0x0601 (Windows 7) 2019-01-23 16:28:27 +08:00
compressor.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
compressor.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
core_io.h Move PSBT decoding functions from core_io to psbt.cpp 2019-03-26 17:38:00 -07:00
core_memusage.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
core_read.cpp Include core_io.h from core_read.cpp 2019-06-06 08:00:33 +02:00
core_write.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
cuckoocache.h Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations. 2018-08-27 18:19:33 +02:00
dbwrapper.cpp Replace deprecated Boost Filesystem function 2019-04-30 10:05:54 +03:00
dbwrapper.h scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
dummywallet.cpp Bugfix: dummywallet: Add -ignorepartialspends to list of ignored wallet options 2019-04-28 04:42:38 +00:00
flatfile.cpp Style cleanup. 2019-02-22 17:38:45 -08:00
flatfile.h Style cleanup. 2019-02-22 17:38:45 -08:00
fs.cpp Avoid redefine warning 2019-04-10 12:16:52 +01:00
fs.h Replace deprecated Boost Filesystem function 2019-04-30 10:05:54 +03:00
hash.cpp Extract CSipHasher to it's own file in crypto/ directory. 2018-11-05 09:25:15 -08:00
hash.h Squashed 'src/secp256k1/' changes from 0b70241850..b19c000063 2019-03-31 11:41:05 -07:00
httprpc.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
httprpc.h Cleanup StartRest() 2018-08-11 09:34:47 +03:00
httpserver.cpp Remove global symbols: Avoid using the global namespace if possible 2019-05-25 23:23:11 +02:00
httpserver.h [build] Add several util units 2019-04-09 17:53:08 -04:00
indirectmap.h
init.cpp Merge #16112: util: Log early messages 2019-06-18 12:32:32 -04:00
init.h Pass chain and client variables where needed 2018-11-06 11:44:40 -04:00
key.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
key.h CKey: add method to negate the key 2019-03-27 13:59:50 +01:00
key_io.cpp Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
key_io.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
keystore.cpp Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
keystore.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
limitedmap.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
logging.cpp test: Log to debug.log in all tests 2019-06-20 12:12:24 -04:00
logging.h test: Log to debug.log in all tests 2019-06-20 12:12:24 -04:00
Makefile.am Move ismine to wallet module 2019-06-19 18:06:30 -04:00
Makefile.bench.include util: Add type safe GetTime 2019-05-23 14:12:32 -04:00
Makefile.leveldb.include build: Remove WINVER pre define in Makefile.leveldb.inlcude 2019-01-26 09:28:48 +08:00
Makefile.qt.include GUI: Move QRImageWidget to its own file-pair 2019-05-02 12:18:18 +00:00
Makefile.qttest.include scripted-diff: Rename test_bitcoin to test/setup_common 2019-04-11 10:12:36 -04:00
Makefile.test.include Move ismine to wallet module 2019-06-19 18:06:30 -04:00
memusage.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
merkleblock.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
merkleblock.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
miner.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
miner.h [rpc] mining: Omit uninitialized currentblockweight, currentblocktx 2019-02-12 11:34:57 -05:00
net.cpp Don't use global (external) symbols for symbols that are used in only one translation unit 2019-06-06 07:45:56 +02:00
net.h net: Rename ::fRelayTxes to ::g_relay_txes 2019-05-09 09:10:53 -04:00
net_processing.cpp Merge #16188: net: Document what happens to getdata of unknown type 2019-06-25 11:12:37 +08:00
net_processing.h banman: create and split out banman 2019-01-16 13:54:18 -05:00
netaddress.cpp Fix spelling errors identified by codespell 1.15.0 2019-06-11 17:18:16 +02:00
netaddress.h netaddress: Update CNetAddr for ORCHIDv2 2019-05-15 14:21:48 -04:00
netbase.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
netbase.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
netmessagemaker.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
noui.cpp Add MSG_NOPREFIX flag for user messages 2019-06-19 19:22:34 +03:00
noui.h Update copyright headers to 2018 2018-12-29 10:15:01 +01:00
optional.h Remove 'boost::optional'-related gcc warnings 2019-01-30 22:44:28 +02:00
outputtype.cpp Replace CScriptID and CKeyID in CTxDestination with dedicated types 2019-04-29 10:15:23 -04:00
outputtype.h Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool. Sort includes. 2018-11-05 17:03:11 +01:00
pow.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
pow.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
prevector.h Merge #12324: speed up Unserialize_impl for prevector 2019-06-18 17:12:02 +02:00
protocol.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
protocol.h Use C++11 default member initializers 2019-01-05 16:16:37 +01:00
psbt.cpp Merge #15427: Add support for descriptors to utxoupdatepsbt 2019-07-02 16:53:22 +02:00
psbt.h Abstract out UpdatePSBTOutput from FillPSBT 2019-05-10 14:31:22 -07:00
pubkey.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
pubkey.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
random.cpp Merge #15224: Add RNG strengthening (10ms once every minute) 2019-05-18 10:01:54 +02:00
random.h Merge #15224: Add RNG strengthening (10ms once every minute) 2019-05-18 10:01:54 +02:00
rest.cpp scripted-diff: replace chainActive -> ::ChainActive() 2019-05-03 15:02:54 -04:00
reverse_iterator.h scripted-diff: Remove trailing whitespaces 2018-07-24 20:46:23 +01:00
reverselock.h
scheduler.cpp Switch all RNG code to the built-in PRNG. 2019-01-16 16:34:56 -08:00
scheduler.h trivial: correct parameter name in comments 2019-02-10 17:17:32 -05:00
serialize.h Merge #12324: speed up Unserialize_impl for prevector 2019-06-18 17:12:02 +02:00
shutdown.cpp Break circular dependency: init -> * -> init by extracting shutdown.h 2018-06-25 00:08:49 -04:00
shutdown.h Break circular dependency: init -> * -> init by extracting shutdown.h 2018-06-25 00:08:49 -04:00
span.h Add more methods to Span class 2018-07-27 11:52:18 -07:00
streams.h Trivial: Doxygenize existing CBufferedFile and VectorReader comments 2019-01-25 12:32:37 -08:00
sync.cpp Replace remaining fprintf with tfm::format manually 2019-06-13 11:46:38 -04:00
sync.h scripted-diff: Rename LockAnnotation to LockAssertion 2019-05-17 13:29:04 +02:00
threadinterrupt.cpp Merge #11640: Make LOCK, LOCK2, TRY_LOCK work with CWaitableCriticalSection 2018-08-31 16:00:38 +02:00
threadinterrupt.h Update copyright headers to 2018 2018-12-29 10:15:01 +01:00
threadsafety.h Move LockAnnotation from threadsafety.h (imported code) to sync.h (our code) 2019-05-17 13:29:04 +02:00
timedata.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
timedata.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
tinyformat.h tinyformat: Add doc to Bitcoin Core specific strprintf 2019-06-13 09:30:40 -04:00
torcontrol.cpp Merge #15651: torcontrol: Use the default/standard network port for Tor hidden services, even if the internal port is set differently 2019-06-18 17:28:44 +02:00
torcontrol.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
txdb.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
txdb.h init: Add CLI option to enable block filter index. 2019-04-06 12:10:55 -07:00
txmempool.cpp validation: Add missing mempool locks 2019-06-07 11:07:09 +02:00
txmempool.h validation: Add missing mempool locks 2019-06-07 11:07:09 +02:00
ui_interface.cpp Merge #16092: Don't use global (external) symbols for symbols that are used in only one translation unit 2019-06-18 15:59:53 -04:00
ui_interface.h Add MSG_NOPREFIX flag for user messages 2019-06-19 19:22:34 +03:00
uint256.cpp util: Make ToLower and ToUpper take a char 2019-01-10 02:51:14 +01:00
uint256.h uint256: Remove unnecessary crypto/common.h use 2018-09-18 14:27:05 +09:00
undo.h Extract CSipHasher to it's own file in crypto/ directory. 2018-11-05 09:25:15 -08:00
validation.cpp Merge #14193: validation: Add missing mempool locks 2019-07-02 16:29:08 +02:00
validation.h Merge #14193: validation: Add missing mempool locks 2019-07-02 16:29:08 +02:00
validationinterface.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
validationinterface.h Remove extra CBlockIndex declaration 2019-06-25 15:02:34 -04:00
version.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
versionbits.cpp MOVEONLY: Move versionbits info out of versionbits.o 2018-09-23 22:55:11 +02:00
versionbits.h MOVEONLY: Move versionbits info out of versionbits.o 2018-09-23 22:55:11 +02:00
versionbitsinfo.cpp MOVEONLY: Move versionbits info out of versionbits.o 2018-09-23 22:55:11 +02:00
versionbitsinfo.h MOVEONLY: Move versionbits info out of versionbits.o 2018-09-23 22:55:11 +02:00
walletinitinterface.h Remove direct node->wallet calls in init.cpp 2018-11-06 11:44:40 -04:00
warnings.cpp Make reasoning about dependencies easier by not including unused dependencies 2019-06-02 17:15:23 +02:00
warnings.h Merge #13780: 0.17: Pre-branch maintenance 2018-08-08 13:55:27 +02:00