diff options
author | Antoine Riard <ariard@student.42.fr> | 2019-04-10 13:38:41 +0000 |
---|---|---|
committer | Antoine Riard <ariard@student.42.fr> | 2019-04-17 08:17:17 -0400 |
commit | 99e88a3726c2325e3a3a35c0a750bde25bd58ad0 (patch) | |
tree | 050a20cb4577f577def4c79210b886eef72e659f /src/rpc/rawtransaction_util.cpp | |
parent | c536dfbcb00fb15963bf5d507b7017c241718bf6 (diff) |
rpc: Remove dependency on interfaces::Chain in SignTransaction
Comment SignTransaction utility
Diffstat (limited to 'src/rpc/rawtransaction_util.cpp')
-rw-r--r-- | src/rpc/rawtransaction_util.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/rpc/rawtransaction_util.cpp b/src/rpc/rawtransaction_util.cpp index 728fc62e25..8af491977c 100644 --- a/src/rpc/rawtransaction_util.cpp +++ b/src/rpc/rawtransaction_util.cpp @@ -149,18 +149,8 @@ static void TxInErrorToJSON(const CTxIn& txin, UniValue& vErrorsRet, const std:: vErrorsRet.push_back(entry); } -// TODO(https://github.com/bitcoin/bitcoin/pull/10973#discussion_r267084237): -// The dependency on interfaces::Chain should be removed, so -// signrawtransactionwithkey doesn't need access to a Chain instance. -UniValue SignTransaction(interfaces::Chain& chain, CMutableTransaction& mtx, const UniValue& prevTxsUnival, CBasicKeyStore *keystore, bool is_temp_keystore, const UniValue& hashType) +UniValue SignTransaction(CMutableTransaction& mtx, const UniValue& prevTxsUnival, CBasicKeyStore* keystore, std::map<COutPoint, Coin>& coins, bool is_temp_keystore, const UniValue& hashType) { - // Fetch previous transactions (inputs): - std::map<COutPoint, Coin> coins; - for (const CTxIn& txin : mtx.vin) { - coins[txin.prevout]; // Create empty map entry keyed by prevout. - } - chain.findCoins(coins); - // Add previous txouts given in the RPC call: if (!prevTxsUnival.isNull()) { UniValue prevTxs = prevTxsUnival.get_array(); |