HomePhabricator

refactor TxToJSON() and ScriptPubKeyToJSON()

Description

refactor TxToJSON() and ScriptPubKeyToJSON()

Summary:
This PR removes almost all of the TxToJSON() and ScriptPubKeyToJSON() code from bitcoin-rpc and places it in bitcoin-common, removing about 80 lines of duplicate code. The only part that can't be moved into bitcoin-common is parsing block contextual information (confirmations and blocktime), which are not available to bitcoin-common code.

Backports Core PR8824 https://github.com/bitcoin/bitcoin/pull/8824

Completes T500.

Test Plan: make check

Reviewers: jasonbcox, deadalnix, O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Subscribers: teamcity

Differential Revision: https://reviews.bitcoinabc.org/D2499

Details

Provenance
jonnynewbs <jonnynewbs@gmail.com>Authored on Feb 4 2019, 23:34
nakihitoCommitted on Feb 5 2019, 19:05
jasonbcoxPushed on Feb 5 2019, 21:40
Reviewer
Restricted Owners Package
Differential Revision
D2499: refactor TxToJSON() and ScriptPubKeyToJSON()
Parents
rSTAGING2c67253db8eb: [avalanche] Limit the number of in flight request per item.
Branches
Unknown
Tags
Unknown