diff options
| author | Jeff Garzik <[email protected]> | 2014-12-31 08:57:55 -0500 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2014-12-31 08:57:55 -0500 |
| commit | 39d6b5fd42bda89f83ea26d6b0226eb7f76eb3c6 (patch) | |
| tree | 88248508e96ac6974b5f0f4ebaa9daa2271d2aec /src/bitcoin-tx.cpp | |
| parent | Merge #5578 from (diff) | |
| parent | bitcoin-tx: Add test case for signing a tx (diff) | |
| download | discoin-39d6b5fd42bda89f83ea26d6b0226eb7f76eb3c6.tar.xz discoin-39d6b5fd42bda89f83ea26d6b0226eb7f76eb3c6.zip | |
Merge #5528 from
branch 'bitcoin-tx-copy-paste' of git://github.com/ers35/bitcoin into merge-5528
Diffstat (limited to 'src/bitcoin-tx.cpp')
| -rw-r--r-- | src/bitcoin-tx.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 337cd44cd..05a85810e 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -368,7 +368,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr) // Add previous txouts given in the RPC call: if (!registers.count("prevtxs")) throw runtime_error("prevtxs register variable must be set."); - UniValue prevtxsObj = registers["privatekeys"]; + UniValue prevtxsObj = registers["prevtxs"]; { for (unsigned int previdx = 0; previdx < prevtxsObj.count(); previdx++) { UniValue prevOut = prevtxsObj[previdx]; @@ -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()); { |