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
..
2019-03-27 11:53:15 +01:00
2019-03-05 11:19:32 +01:00
2018-12-29 10:15:01 +01:00
2019-03-29 10:22:24 +01:00
2019-02-22 17:38:45 -08:00
2019-03-31 11:37:28 +01:00
2019-01-26 12:45:48 -05:00
2019-03-05 10:20:00 -04:00
2019-02-25 10:12:29 -05:00
2018-12-17 21:02:42 -08:00
2019-03-22 10:30:25 -04:00
2019-04-06 08:55:17 -07:00
2019-02-16 21:39:32 +01:00
2017-09-29 16:02:39 +02:00
2019-01-23 16:28:27 +08:00
2019-03-29 10:22:24 +01:00
2018-09-07 08:21:14 -04:00
2019-03-10 21:45:31 -06:00
2019-04-04 13:17:31 -04:00
2019-01-25 14:16:07 -05:00
2018-04-13 15:37:20 -04:00
2019-01-16 13:54:18 -05:00
2019-01-16 13:54:18 -05:00
2019-03-01 16:15:50 -05:00
2019-02-27 16:53:44 -05:00
2018-12-29 10:15:01 +01:00
2018-11-04 22:46:07 -08:00
2018-12-04 19:55:04 +02:00
2018-11-05 17:03:11 +01:00
2019-01-22 21:10:48 +00:00
2019-01-22 21:10:48 +00:00
2018-11-04 22:46:07 -08:00
2018-11-05 17:03:11 +01:00
2018-08-27 18:19:33 +02:00
2018-03-22 16:23:04 +01:00
2019-03-11 10:28:42 -04:00
2019-02-06 14:16:43 -05:00
2019-01-30 16:26:52 -05:00
2019-02-06 14:16:43 -05:00
2018-11-23 10:17:46 +01:00
2018-11-05 09:25:15 -08:00
2018-11-13 12:41:41 -08:00
2019-03-05 09:08:04 +01:00
2019-03-05 09:08:04 +01:00
2018-08-25 17:41:00 +02:00
2018-08-13 01:24:55 +02:00
2018-07-27 07:15:02 -04:00
2019-02-22 17:38:45 -08:00
2019-02-17 03:38:08 +00:00
2018-10-07 13:11:36 +01:00
2018-11-04 22:46:07 -08:00
2018-07-27 07:15:02 -04:00
2018-08-13 13:57:15 +02:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-11-05 09:25:15 -08:00
2019-01-24 19:47:07 -08:00
2019-01-23 16:28:27 +08:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2019-03-26 17:38:00 -07:00
2018-07-27 07:15:02 -04:00
2019-03-26 17:38:00 -07:00
2018-11-04 22:46:07 -08:00
2018-08-27 18:19:33 +02:00
2018-09-04 13:11:26 +02:00
2018-11-04 22:46:07 -08:00
2019-02-04 12:20:42 +00:00
2019-02-22 17:38:45 -08:00
2019-02-22 17:38:45 -08:00
2019-02-23 23:44:28 +08:00
2018-12-29 10:15:01 +01:00
2018-11-05 09:25:15 -08:00
2018-11-30 18:48:58 +01:00
2018-11-04 22:46:07 -08:00
2018-08-11 09:34:47 +03:00
2019-01-29 15:30:24 -05:00
2018-09-13 10:36:41 -07:00
2019-03-18 13:56:56 -04:00
2018-11-06 11:44:40 -04:00
2019-02-07 22:30:25 +01:00
2018-07-27 07:15:02 -04:00
2019-01-31 15:00:56 +00:00
2018-09-13 10:36:41 -07:00
2018-11-04 22:46:07 -08:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2019-01-29 15:30:24 -05:00
2019-01-29 15:30:24 -05:00
2019-04-06 08:55:17 -07:00
2019-03-27 11:53:15 +01:00
2019-01-26 09:28:48 +08:00
2019-01-18 00:34:47 +00:00
2019-01-04 06:31:07 -05:00
2019-03-06 15:16:23 -05:00
2018-07-27 07:15:02 -04:00
2019-01-10 01:58:33 +01:00
2018-07-27 07:15:02 -04:00
2019-02-12 11:34:57 -05:00
2019-02-12 11:34:57 -05:00
2019-04-04 16:45:23 -04:00
2019-01-16 13:54:18 -05:00
2019-03-23 11:32:40 -04:00
2019-04-04 16:45:23 -04:00
2019-02-04 13:47:55 -05:00
2018-11-23 09:53:20 +01:00
2019-01-24 15:58:49 -08:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-11-04 22:46:07 -08:00
2018-12-29 10:15:01 +01:00
2019-01-30 22:44:28 +02:00
2018-07-27 07:15:02 -04:00
2018-11-05 17:03:11 +01:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-11-14 12:19:28 -05:00
2018-11-04 22:46:07 -08:00
2019-01-05 16:16:37 +01:00
2019-03-26 17:38:00 -07:00
2019-03-26 17:38:00 -07:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2019-02-18 10:56:55 +01:00
2019-02-03 17:34:26 -08:00
2019-02-25 10:12:29 -05:00
2018-07-24 20:46:23 +01:00
2019-01-16 16:34:56 -08:00
2019-02-10 17:17:32 -05:00
2018-09-11 00:58:13 -04:00
2018-06-25 00:08:49 -04:00
2018-06-25 00:08:49 -04:00
2018-07-27 11:52:18 -07:00
2019-01-25 12:32:37 -08:00
2019-01-25 13:21:59 +09:00
2018-12-14 16:26:13 -05:00
2018-08-31 16:00:38 +02:00
2018-12-29 10:15:01 +01:00
2018-11-06 11:44:40 -04:00
2018-11-04 22:46:07 -08:00
2018-07-27 07:15:02 -04:00
2018-03-21 08:34:44 +02:00
2019-01-13 22:50:36 -08:00
2018-07-27 07:15:02 -04:00
2018-11-04 22:46:07 -08:00
2018-08-08 13:55:27 +02:00
2019-02-25 10:12:29 -05:00
2019-02-25 10:12:29 -05:00
2019-02-22 15:43:02 -04:00
2019-02-22 15:43:02 -04:00
2019-01-10 02:51:14 +01:00
2018-09-18 14:27:05 +09:00
2018-11-05 09:25:15 -08:00
2019-03-19 14:20:43 -04:00
2019-03-19 14:20:43 -04:00
2019-02-03 22:23:44 +00:00
2018-08-26 00:25:28 +02:00
2018-07-27 07:15:02 -04:00
2018-09-23 22:55:11 +02:00
2018-09-23 22:55:11 +02:00
2018-09-23 22:55:11 +02:00
2018-09-23 22:55:11 +02:00
2018-11-06 11:44:40 -04:00
2018-11-04 22:46:07 -08:00
2018-08-08 13:55:27 +02:00