From ea12ce2c85aaf117f3caee5437b7d54a37d90eb1 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 12 Dec 2019 17:36:15 -0500 Subject: [PATCH] src/rcp/rawtransaction.cpp upstream changes --- src/rpc/rawtransaction.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 1594043a8..0fcb5411b 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2019 The Hush developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -422,7 +423,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry) } } -UniValue getrawtransaction(const UniValue& params, bool fHelp) +UniValue getrawtransaction(const UniValue& params, bool fHelp, const CPubKey& mypk) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( @@ -611,7 +612,7 @@ int32_t gettxout_scriptPubKey(uint8_t *scriptPubKey,int32_t maxsize,uint256 txid return(-1); } -UniValue gettxoutproof(const UniValue& params, bool fHelp) +UniValue gettxoutproof(const UniValue& params, bool fHelp, const CPubKey& mypk) { if (fHelp || (params.size() != 1 && params.size() != 2)) throw runtime_error( @@ -692,7 +693,7 @@ UniValue gettxoutproof(const UniValue& params, bool fHelp) return strHex; } -UniValue verifytxoutproof(const UniValue& params, bool fHelp) +UniValue verifytxoutproof(const UniValue& params, bool fHelp, const CPubKey& mypk) { if (fHelp || params.size() != 1) throw runtime_error( @@ -725,7 +726,7 @@ UniValue verifytxoutproof(const UniValue& params, bool fHelp) return res; } -UniValue createrawtransaction(const UniValue& params, bool fHelp) +UniValue createrawtransaction(const UniValue& params, bool fHelp, const CPubKey& mypk) { string examplescriptPubKey = "21021ce1eac70455c3e6c52d67c133549b8aed4a588fba594372e8048e65c4f0fcb6ac"; @@ -885,7 +886,7 @@ UniValue createrawtransaction(const UniValue& params, bool fHelp) return EncodeHexTx(rawTx); } -UniValue decoderawtransaction(const UniValue& params, bool fHelp) +UniValue decoderawtransaction(const UniValue& params, bool fHelp, const CPubKey& mypk) { if (fHelp || params.size() != 1) throw runtime_error( @@ -980,7 +981,7 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp) return result; } -UniValue decodescript(const UniValue& params, bool fHelp) +UniValue decodescript(const UniValue& params, bool fHelp, const CPubKey& mypk) { if (fHelp || params.size() != 1) throw runtime_error( @@ -1034,7 +1035,7 @@ static void TxInErrorToJSON(const CTxIn& txin, UniValue& vErrorsRet, const std:: vErrorsRet.push_back(entry); } -UniValue signrawtransaction(const UniValue& params, bool fHelp) +UniValue signrawtransaction(const UniValue& params, bool fHelp, const CPubKey& mypk) { if (fHelp || params.size() < 1 || params.size() > 5) throw runtime_error( @@ -1331,7 +1332,7 @@ UniValue signrawtransaction(const UniValue& params, bool fHelp) extern UniValue NSPV_broadcast(char *hex); -UniValue sendrawtransaction(const UniValue& params, bool fHelp) +UniValue sendrawtransaction(const UniValue& params, bool fHelp, const CPubKey& mypk) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error(