HomePhabricator

refactor TxToJSON() and ScriptPubKeyToJSON()

Authored by jonnynewbs <jonnynewbs@gmail.com> on Feb 4 2019, 23:34.

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

Committed
nakihitoFeb 5 2019, 19:05
Pushed
nakihitoFeb 5 2019, 19:08
Reviewer
Restricted Owners Package
Differential Revision
D2499: refactor TxToJSON() and ScriptPubKeyToJSON()
Parents
rABC2c67253db8eb: [avalanche] Limit the number of in flight request per item.
Branches
Unknown
Tags
Unknown

Event Timeline

Nico Guiton <nico@bitframe.org> committed rABC76c64df03947: refactor TxToJSON() and ScriptPubKeyToJSON() (authored by jonnynewbs <jonnynewbs@gmail.com>).Feb 5 2019, 19:05
Nico Guiton <nico@bitframe.org> committed rABC76c64df03947: refactor TxToJSON() and ScriptPubKeyToJSON() (authored by jonnynewbs <jonnynewbs@gmail.com>).