From c1ec8014fab2f915c0333a6b9fc7e45877bc5abe Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 9 May 2018 09:58:52 +0300 Subject: [PATCH] Test --- src/rpcrawtransaction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index db830b388..8b722e931 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -142,8 +142,8 @@ void TxToJSONExpanded(const CTransaction& tx, const uint256 hashBlock, UniValue& uint256 hash; CTransaction tx; CTxDestination address; if (GetTransaction(txin.prevout.hash,tx,hash,false)) { - if (ExtractDestination(tx.scriptPubKey, address)) - in.push_back(Pair("address", address.ToString())); + if (ExtractDestination(tx.vout[txin.prevout.n].scriptPubKey, address)) + in.push_back(Pair("address", CBitcoinAddress(address).ToString())); } } UniValue o(UniValue::VOBJ);