lbrycrd/src/rpc
Pieter Wuille e439aeb30c
Merge #15508: Refactor analyzepsbt for use outside RPC code
892eff05f1 Add documentation of struct PSBTAnalysis et al (Glenn Willen)
ef22fe8c1f Refactor analyzepsbt for use outside RPC code (Glenn Willen)
afd20a25f2 Move PSBT decoding functions from core_io to psbt.cpp (Glenn Willen)

Pull request description:

  Refactor the analyzepsbt RPC into (1) an AnalyzePSBT function, which returns
  its output as a new strongly-typed PSBTAnalysis struct, and (2) a thin wrapper
  which converts the struct into a UniValue for RPC use.

  ----

  As with my previous refactoring PR, I need this because I am creating a dependency on this code from the GUI. Per discussion in #bitcoin-core-dev on IRC, since we don't want to create a dependency on UniValue in anything outside RPC, I introduced some new structs to hold the info we get when analyzing a PSBT. For the field types, I used whatever types are already used internally for this data (e.g. CAmount, CFeeRate, CKeyID), and only convert to int/string etc. in the wrapper.

  @achow101, maybe take the first look? :-)

ACKs for commit 892eff:
  sipa:
    utACK 892eff05f1
  achow101:
    utACK 892eff05f1
  ryanofsky:
    utACK 892eff05f1. Just small cleanups since the last review: removing unneeded include, forward decl, adding const ref

Tree-SHA512: eb278b0a82717ebc3eb0c08dc5bb4eefb996a317a6a3a8ecf51cd88110ddbb188ad3482cdd9563e557995e73aca5a282c1f6e352bc598155f1203b7b46fe5dee
2019-04-06 08:55:17 -07:00
..
blockchain.cpp rpc: Rename size to vsize in mempool related calls 2019-03-24 12:01:43 +08:00
blockchain.h rpc: Pass mempool into MempoolToJSON 2019-02-25 10:12:29 -05:00
client.cpp wallet/rpc: add maxfeerate parameter to testmempoolaccept 2019-03-14 08:48:46 +09:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
mining.cpp doc: rpc-mining: Clarify error messages 2019-03-28 09:35:32 -04:00
mining.h Move ParseConfirmTarget from rpc/mining to rpc/util 2019-02-08 15:29:45 -05:00
misc.cpp [rpc] Remove deprecated functionality message from validateaddress help 2019-03-22 10:30:25 -04:00
net.cpp rpc: Actually throw help when passed invalid number of params 2019-02-20 13:34:16 -05:00
protocol.cpp scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
protocol.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
rawtransaction.cpp Merge #15508: Refactor analyzepsbt for use outside RPC code 2019-04-06 08:55:17 -07:00
rawtransaction.h Pass chain and client variables where needed 2018-11-06 11:44:40 -04:00
register.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
server.cpp Remove use of CRPCTable::appendCommand in wallet code 2019-03-05 10:20:00 -04:00
server.h Remove use of CRPCTable::appendCommand in wallet code 2019-03-05 10:20:00 -04:00
util.cpp Merge #15288: Remove wallet -> node global function calls 2019-03-04 13:13:36 -05:00
util.h Merge #15288: Remove wallet -> node global function calls 2019-03-04 13:13:36 -05:00