diff options
author | jonnynewbs <jonnynewbs@gmail.com> | 2016-09-21 20:51:00 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-04-28 10:01:56 -0400 |
commit | 0ff9320bf5b60968669269b05b0eba65dd69c6b6 (patch) | |
tree | eac1dd4f4bd2efd2ef144528fa967557ea3030d5 /src/rpc/blockchain.cpp | |
parent | 4c924011f535c46b3bc02bef8b7e2a8ad559d78d (diff) | |
download | bitcoin-0ff9320bf5b60968669269b05b0eba65dd69c6b6.tar.xz |
refactor TxToJSON() and ScriptPubKeyToJSON()
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r-- | src/rpc/blockchain.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 01066d0eb2..8f446aee65 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -12,6 +12,7 @@ #include "coins.h" #include "consensus/validation.h" #include "validation.h" +#include "core_io.h" #include "policy/policy.h" #include "primitives/transaction.h" #include "rpc/server.h" @@ -123,7 +124,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx if(txDetails) { UniValue objTx(UniValue::VOBJ); - TxToJSON(*tx, uint256(), objTx); + TxToUniv(*tx, uint256(), objTx); txs.push_back(objTx); } else @@ -975,7 +976,7 @@ UniValue gettxout(const JSONRPCRequest& request) ret.push_back(Pair("confirmations", pindex->nHeight - coins.nHeight + 1)); ret.push_back(Pair("value", ValueFromAmount(coins.vout[n].nValue))); UniValue o(UniValue::VOBJ); - ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true); + ScriptPubKeyToUniv(coins.vout[n].scriptPubKey, o, true); ret.push_back(Pair("scriptPubKey", o)); ret.push_back(Pair("version", coins.nVersion)); ret.push_back(Pair("coinbase", coins.fCoinBase)); |