Skip to content

Commit

Permalink
bitcoin-tx: Refer to the JSON fields rather than the whole object
Browse files Browse the repository at this point in the history
  • Loading branch information
ers35 committed Dec 23, 2014
1 parent 2a3d988 commit a089c50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,13 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
if (!prevOut.checkObject(types))
throw runtime_error("prevtxs internal object typecheck fail");

uint256 txid = ParseHashUV(prevOut, "txid");
uint256 txid = ParseHashUV(prevOut["txid"], "txid");

int nOut = atoi(prevOut["vout"].getValStr());
if (nOut < 0)
throw runtime_error("vout must be positive");

vector<unsigned char> pkData(ParseHexUV(prevOut, "scriptPubKey"));
vector<unsigned char> pkData(ParseHexUV(prevOut["scriptPubKey"], "scriptPubKey"));
CScript scriptPubKey(pkData.begin(), pkData.end());

{
Expand Down

0 comments on commit a089c50

Please sign in to comment.