diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,6 +77,7 @@ logging.cpp random.cpp rpc/protocol.cpp + rpc/util.cpp support/cleanse.cpp support/lockedpool.cpp sync.cpp diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -171,6 +171,7 @@ rpc/server.h \ rpc/tojson.h \ rpc/register.h \ + rpc/util.h \ rwcollection.h \ scheduler.h \ script/scriptcache.h \ @@ -428,6 +429,7 @@ logging.cpp \ random.cpp \ rpc/protocol.cpp \ + rpc/util.cpp \ support/cleanse.cpp \ sync.cpp \ threadinterrupt.cpp \ diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -282,88 +282,7 @@ // Needed even with !ENABLE_WALLET, to pass (ignored) pointers around class CWallet; -/** - * Used by addmultisigaddress / createmultisig: - */ -CScript createmultisig_redeemScript(CWallet *const pwallet, - const UniValue ¶ms) { - int nRequired = params[0].get_int(); - const UniValue &keys = params[1].get_array(); - - // Gather public keys - if (nRequired < 1) { - throw std::runtime_error( - "a multisignature address must require at least one key to redeem"); - } - if ((int)keys.size() < nRequired) { - throw std::runtime_error( - strprintf("not enough keys supplied " - "(got %u keys, but need at least %d to redeem)", - keys.size(), nRequired)); - } - if (keys.size() > 16) { - throw std::runtime_error( - "Number of addresses involved in the " - "multisignature address creation > 16\nReduce the " - "number"); - } - std::vector pubkeys; - pubkeys.resize(keys.size()); - for (size_t i = 0; i < keys.size(); i++) { - const std::string &ks = keys[i].get_str(); -#ifdef ENABLE_WALLET - // Case 1: Bitcoin address and we have full public key: - if (pwallet) { - CTxDestination dest = DecodeDestination(ks, pwallet->chainParams); - if (IsValidDestination(dest)) { - const CKeyID *keyID = boost::get(&dest); - if (!keyID) { - throw std::runtime_error( - strprintf("%s does not refer to a key", ks)); - } - CPubKey vchPubKey; - if (!pwallet->GetPubKey(*keyID, vchPubKey)) { - throw std::runtime_error( - strprintf("no full public key for address %s", ks)); - } - if (!vchPubKey.IsFullyValid()) { - throw std::runtime_error(" Invalid public key: " + ks); - } - pubkeys[i] = vchPubKey; - continue; - } - } -#endif - // Case 2: hex public key - if (IsHex(ks)) { - CPubKey vchPubKey(ParseHex(ks)); - if (!vchPubKey.IsFullyValid()) { - throw std::runtime_error(" Invalid public key: " + ks); - } - pubkeys[i] = vchPubKey; - } else { - throw std::runtime_error(" Invalid public key: " + ks); - } - } - - CScript result = GetScriptForMultisig(nRequired, pubkeys); - if (result.size() > MAX_SCRIPT_ELEMENT_SIZE) { - throw std::runtime_error( - strprintf("redeemScript exceeds size limit: %d > %d", result.size(), - MAX_SCRIPT_ELEMENT_SIZE)); - } - - return result; -} - -static UniValue createmultisig(const Config &config, - const JSONRPCRequest &request) { -#ifdef ENABLE_WALLET - CWallet *const pwallet = GetWalletForJSONRPCRequest(request); -#else - CWallet *const pwallet = nullptr; -#endif - +UniValue createmultisig(const Config &config, const JSONRPCRequest &request) { if (request.fHelp || request.params.size() < 2 || request.params.size() > 2) { std::string msg = @@ -371,7 +290,12 @@ "\nCreates a multi-signature address with n signature of m keys " "required.\n" "It returns a json object with the address and redeemScript.\n" - + "DEPRECATION WARNING: Using addresses with createmultisig is " + "deprecated. Clients must\n" + "transition to using addmultisigaddress to create multisig " + "addresses with addresses known\n" + "to the wallet before upgrading to v0.17. To use the deprecated " + "functionality, start bitcoind with -deprecatedrpc=createmultisig\n" "\nArguments:\n" "1. nrequired (numeric, required) The number of required " "signatures out of the n keys or addresses.\n" @@ -405,8 +329,40 @@ throw std::runtime_error(msg); } + int required = request.params[0].get_int(); + + // Get the public keys + const UniValue &keys = request.params[1].get_array(); + std::vector pubkeys; + for (unsigned int i = 0; i < keys.size(); ++i) { + if (IsHex(keys[i].get_str()) && (keys[i].get_str().length() == 66 || + keys[i].get_str().length() == 130)) { + pubkeys.push_back(HexToPubKey(keys[i].get_str())); + } else { +#ifdef ENABLE_WALLET + CWallet *const pwallet = GetWalletForJSONRPCRequest(request); + if (IsDeprecatedRPCEnabled(gArgs, "createmultisig") && + EnsureWalletIsAvailable(pwallet, false)) { + pubkeys.push_back(AddrToPubKey(config.GetChainParams(), pwallet, + keys[i].get_str())); + } else +#endif + throw JSONRPCError( + RPC_INVALID_ADDRESS_OR_KEY, + strprintf("Invalid public key: %s\nNote that from v0.16, " + "createmultisig no longer accepts addresses." + " Clients must transition to using " + "addmultisigaddress to create multisig addresses " + "with addresses known to the wallet before " + "upgrading to v0.17." + " To use the deprecated functionality, start " + "bitcoind with -deprecatedrpc=createmultisig", + keys[i].get_str())); + } + } + // Construct using pay-to-script-hash: - CScript inner = createmultisig_redeemScript(pwallet, request.params); + CScript inner = CreateMultisigRedeemscript(required, pubkeys); CScriptID innerID(inner); UniValue result(UniValue::VOBJ); diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp --- a/src/rpc/protocol.cpp +++ b/src/rpc/protocol.cpp @@ -7,10 +7,10 @@ #include "random.h" #include "tinyformat.h" -#include "util.h" #include "utilstrencodings.h" #include "utiltime.h" #include "version.h" +#include #include #include diff --git a/src/rpc/safemode.cpp b/src/rpc/safemode.cpp --- a/src/rpc/safemode.cpp +++ b/src/rpc/safemode.cpp @@ -1,8 +1,8 @@ #include "safemode.h" #include "rpc/protocol.h" -#include "util.h" #include "warnings.h" +#include void ObserveSafeMode() { std::string warning = GetWarnings("rpc"); diff --git a/src/rpc/server.h b/src/rpc/server.h --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -11,7 +11,7 @@ #include "rpc/jsonrpcrequest.h" #include "rpc/protocol.h" #include "uint256.h" -#include "util.h" +#include #include #include diff --git a/src/rpc/util.h b/src/rpc/util.h new file mode 100644 --- /dev/null +++ b/src/rpc/util.h @@ -0,0 +1,22 @@ +// Copyright (c) 2017 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_RPC_UTIL_H +#define BITCOIN_RPC_UTIL_H + +#include +#include + +class CChainParams; +class CKeyStore; +class CPubKey; +class CScript; + +CPubKey HexToPubKey(const std::string &hex_in); +CPubKey AddrToPubKey(const CChainParams &chainparams, CKeyStore *const keystore, + const std::string &addr_in); +CScript CreateMultisigRedeemscript(const int required, + const std::vector &pubkeys); + +#endif // BITCOIN_RPC_UTIL_H diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp new file mode 100644 --- /dev/null +++ b/src/rpc/util.cpp @@ -0,0 +1,87 @@ +// Copyright (c) 2017 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Converts a hex string to a public key if possible +CPubKey HexToPubKey(const std::string &hex_in) { + if (!IsHex(hex_in)) { + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, + "Invalid public key: " + hex_in); + } + CPubKey vchPubKey(ParseHex(hex_in)); + if (!vchPubKey.IsFullyValid()) { + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, + "Invalid public key: " + hex_in); + } + return vchPubKey; +} + +// Retrieves a public key for an address from the given CKeyStore +CPubKey AddrToPubKey(const CChainParams &chainparams, CKeyStore *const keystore, + const std::string &addr_in) { + CTxDestination dest = DecodeDestination(addr_in, chainparams); + if (!IsValidDestination(dest)) { + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, + "Invalid address: " + addr_in); + } + CKeyID key = boost::get(dest); + if (key.IsNull()) { + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, + strprintf("%s does not refer to a key", addr_in)); + } + CPubKey vchPubKey; + if (!keystore->GetPubKey(key, vchPubKey)) { + throw JSONRPCError( + RPC_INVALID_ADDRESS_OR_KEY, + strprintf("no full public key for address %s", addr_in)); + } + if (!vchPubKey.IsFullyValid()) { + throw JSONRPCError(RPC_INTERNAL_ERROR, + "Wallet contains an invalid public key"); + } + return vchPubKey; +} + +// Creates a multisig redeemscript from a given list of public keys and number +// required. +CScript CreateMultisigRedeemscript(const int required, + const std::vector &pubkeys) { + // Gather public keys + if (required < 1) { + throw JSONRPCError( + RPC_INVALID_PARAMETER, + "a multisignature address must require at least one key to redeem"); + } + if ((int)pubkeys.size() < required) { + throw JSONRPCError(RPC_INVALID_PARAMETER, + strprintf("not enough keys supplied (got %u keys, " + "but need at least %d to redeem)", + pubkeys.size(), required)); + } + if (pubkeys.size() > 16) { + throw JSONRPCError(RPC_INVALID_PARAMETER, + "Number of keys involved in the multisignature " + "address creation > 16\nReduce the number"); + } + + CScript result = GetScriptForMultisig(required, pubkeys); + + if (result.size() > MAX_SCRIPT_ELEMENT_SIZE) { + throw JSONRPCError( + RPC_INVALID_PARAMETER, + (strprintf("redeemScript exceeds size limit: %d > %d", + result.size(), MAX_SCRIPT_ELEMENT_SIZE))); + } + + return result; +} diff --git a/src/util.cpp b/src/util.cpp --- a/src/util.cpp +++ b/src/util.cpp @@ -10,6 +10,7 @@ #include "util.h" #include "chainparamsbase.h" +#include "dstencode.h" #include "fs.h" #include "random.h" #include "serialize.h" diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -17,6 +17,7 @@ #include "rpc/misc.h" #include "rpc/safemode.h" #include "rpc/server.h" +#include "rpc/util.h" #include "timedata.h" #include "util.h" #include "utilmoneystr.h" @@ -1304,8 +1305,8 @@ return wtx.GetId().GetHex(); } -static UniValue addmultisigaddress(const Config &config, - const JSONRPCRequest &request) { +UniValue addmultisigaddress(const Config &config, + const JSONRPCRequest &request) { CWallet *const pwallet = GetWalletForJSONRPCRequest(request); if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { return NullUniValue; @@ -1335,8 +1336,18 @@ "assign the addresses to.\n" "\nResult:\n" - "\"address\" (string) A bitcoin address associated with " - "the keys.\n" + "{\n" + " \"address\":\"multisigaddress\", (string) The value of the " + "new multisig address.\n" + " \"redeemScript\":\"script\" (string) The string value " + "of the hex-encoded redemption script.\n" + "}\n" + "\nResult (DEPRECATED. To see this result in v0.16 instead, please " + "start bitcoind with -deprecatedrpc=addmultisigaddress).\n" + " clients should transition to the new output api before " + "upgrading to v0.17.\n" + "\"address\" (string) A bitcoin address " + "associated with the keys.\n" "\nExamples:\n" "\nAdd a multisig address from 2 addresses\n" + @@ -1359,13 +1370,38 @@ label = LabelFromValue(request.params[2]); } + int required = request.params[0].get_int(); + + // Get the public keys + const UniValue &keys_or_addrs = request.params[1].get_array(); + std::vector pubkeys; + for (unsigned int i = 0; i < keys_or_addrs.size(); ++i) { + if (IsHex(keys_or_addrs[i].get_str()) && + (keys_or_addrs[i].get_str().length() == 66 || + keys_or_addrs[i].get_str().length() == 130)) { + pubkeys.push_back(HexToPubKey(keys_or_addrs[i].get_str())); + } else { + pubkeys.push_back(AddrToPubKey(config.GetChainParams(), pwallet, + keys_or_addrs[i].get_str())); + } + } + // Construct using pay-to-script-hash: - CScript inner = createmultisig_redeemScript(pwallet, request.params); + CScript inner = CreateMultisigRedeemscript(required, pubkeys); CScriptID innerID(inner); pwallet->AddCScript(inner); pwallet->SetAddressBook(innerID, label, "send"); - return EncodeDestination(innerID); + + // Return old style interface + if (IsDeprecatedRPCEnabled(gArgs, "addmultisigaddress")) { + return EncodeDestination(innerID); + } + + UniValue result(UniValue::VOBJ); + result.pushKV("address", EncodeDestination(innerID)); + result.pushKV("redeemScript", HexStr(inner.begin(), inner.end())); + return result; } struct tallyitem { diff --git a/test/functional/deprecated_rpc.py b/test/functional/deprecated_rpc.py new file mode 100755 --- /dev/null +++ b/test/functional/deprecated_rpc.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# Copyright (c) 2017 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +"""Test deprecation of RPC calls.""" +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import assert_raises_rpc_error + + +class DeprecatedRpcTest(BitcoinTestFramework): + def set_test_params(self): + self.num_nodes = 2 + self.setup_clean_chain = True + self.extra_args = [ + [], ["-deprecatedrpc=createmultisig"]] + + def run_test(self): + self.log.info( + "Make sure that -deprecatedrpc=createmultisig allows it to take addresses") + assert_raises_rpc_error(-5, "Invalid public key", + self.nodes[0].createmultisig, 1, [self.nodes[0].getnewaddress()]) + self.nodes[1].createmultisig(1, [self.nodes[1].getnewaddress()]) + + +if __name__ == '__main__': + DeprecatedRpcTest().main() diff --git a/test/functional/fundrawtransaction.py b/test/functional/fundrawtransaction.py --- a/test/functional/fundrawtransaction.py +++ b/test/functional/fundrawtransaction.py @@ -370,7 +370,7 @@ addr2Obj = self.nodes[1].validateaddress(addr2) mSigObj = self.nodes[1].addmultisigaddress( - 2, [addr1Obj['pubkey'], addr2Obj['pubkey']]) + 2, [addr1Obj['pubkey'], addr2Obj['pubkey']])['address'] inputs = [] outputs = {mSigObj: 1.1} @@ -403,7 +403,7 @@ addr5Obj = self.nodes[1].validateaddress(addr5) mSigObj = self.nodes[1].addmultisigaddress( - 4, [addr1Obj['pubkey'], addr2Obj['pubkey'], addr3Obj['pubkey'], addr4Obj['pubkey'], addr5Obj['pubkey']]) + 4, [addr1Obj['pubkey'], addr2Obj['pubkey'], addr3Obj['pubkey'], addr4Obj['pubkey'], addr5Obj['pubkey']])['address'] inputs = [] outputs = {mSigObj: 1.1} @@ -430,7 +430,7 @@ addr2Obj = self.nodes[2].validateaddress(addr2) mSigObj = self.nodes[2].addmultisigaddress( - 2, [addr1Obj['pubkey'], addr2Obj['pubkey']]) + 2, [addr1Obj['pubkey'], addr2Obj['pubkey']])['address'] # send 1.2 BTC to msig addr txId = self.nodes[0].sendtoaddress(mSigObj, 1.2) diff --git a/test/functional/importmulti.py b/test/functional/importmulti.py --- a/test/functional/importmulti.py +++ b/test/functional/importmulti.py @@ -241,7 +241,7 @@ sig_address_3 = self.nodes[0].validateaddress( self.nodes[0].getnewaddress()) multi_sig_script = self.nodes[0].createmultisig( - 2, [sig_address_1['address'], sig_address_2['address'], sig_address_3['pubkey']]) + 2, [sig_address_1['pubkey'], sig_address_2['pubkey'], sig_address_3['pubkey']]) self.nodes[1].generate(100) transactionid = self.nodes[1].sendtoaddress( multi_sig_script['address'], 10.00) @@ -275,7 +275,7 @@ sig_address_3 = self.nodes[0].validateaddress( self.nodes[0].getnewaddress()) multi_sig_script = self.nodes[0].createmultisig( - 2, [sig_address_1['address'], sig_address_2['address'], sig_address_3['pubkey']]) + 2, [sig_address_1['pubkey'], sig_address_2['pubkey'], sig_address_3['pubkey']]) self.nodes[1].generate(100) transactionid = self.nodes[1].sendtoaddress( multi_sig_script['address'], 10.00) @@ -309,7 +309,7 @@ sig_address_3 = self.nodes[0].validateaddress( self.nodes[0].getnewaddress()) multi_sig_script = self.nodes[0].createmultisig( - 2, [sig_address_1['address'], sig_address_2['address'], sig_address_3['pubkey']]) + 2, [sig_address_1['pubkey'], sig_address_2['pubkey'], sig_address_3['pubkey']]) self.nodes[1].generate(100) transactionid = self.nodes[1].sendtoaddress( multi_sig_script['address'], 10.00) @@ -345,7 +345,7 @@ sig_address_3 = self.nodes[0].validateaddress( self.nodes[0].getnewaddress()) multi_sig_script = self.nodes[0].createmultisig( - 2, [sig_address_1['address'], sig_address_2['address'], sig_address_3['pubkey']]) + 2, [sig_address_1['pubkey'], sig_address_2['pubkey'], sig_address_3['pubkey']]) self.nodes[1].generate(100) transactionid = self.nodes[1].sendtoaddress( multi_sig_script['address'], 10.00) diff --git a/test/functional/listtransactions.py b/test/functional/listtransactions.py --- a/test/functional/listtransactions.py +++ b/test/functional/listtransactions.py @@ -83,8 +83,9 @@ {"category": "receive", "amount": Decimal("0.44")}, {"txid": txid, "account": "toself"}) - multisig = self.nodes[1].createmultisig( - 1, [self.nodes[1].getnewaddress()]) + pubkey = self.nodes[1].validateaddress( + self.nodes[1].getnewaddress())['pubkey'] + multisig = self.nodes[1].createmultisig(1, [pubkey]) self.nodes[0].importaddress( multisig["redeemScript"], "watchonly", False, True) txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1) diff --git a/test/functional/nulldummy.py b/test/functional/nulldummy.py --- a/test/functional/nulldummy.py +++ b/test/functional/nulldummy.py @@ -48,7 +48,8 @@ def run_test(self): self.address = self.nodes[0].getnewaddress() - self.ms_address = self.nodes[0].addmultisigaddress(1, [self.address]) + self.ms_address = self.nodes[0].addmultisigaddress(1, [self.address])[ + 'address'] NetworkThread().start() # Start up network handling in another thread self.coinbase_blocks = self.nodes[0].generate(2) # Block 2 diff --git a/test/functional/rawtransactions.py b/test/functional/rawtransactions.py --- a/test/functional/rawtransactions.py +++ b/test/functional/rawtransactions.py @@ -66,8 +66,18 @@ addr1Obj = self.nodes[2].validateaddress(addr1) addr2Obj = self.nodes[2].validateaddress(addr2) - mSigObj = self.nodes[2].addmultisigaddress( + # Tests for createmultisig and addmultisigaddress + assert_raises_rpc_error(-5, "Invalid public key", + self.nodes[0].createmultisig, 1, ["01020304"]) + # createmultisig can only take public keys + self.nodes[0].createmultisig( 2, [addr1Obj['pubkey'], addr2Obj['pubkey']]) + # addmultisigaddress can take both pubkeys and addresses so long as they are in the wallet, which is tested here. + assert_raises_rpc_error(-5, "Invalid public key", + self.nodes[0].createmultisig, 2, [addr1Obj['pubkey'], addr1]) + + mSigObj = self.nodes[2].addmultisigaddress( + 2, [addr1Obj['pubkey'], addr1])['address'] # use balance deltas instead of absolute values bal = self.nodes[2].getbalance() @@ -92,7 +102,7 @@ addr3Obj = self.nodes[2].validateaddress(addr3) mSigObj = self.nodes[2].addmultisigaddress( - 2, [addr1Obj['pubkey'], addr2Obj['pubkey'], addr3Obj['pubkey']]) + 2, [addr1Obj['pubkey'], addr2Obj['pubkey'], addr3Obj['pubkey']])['address'] txId = self.nodes[0].sendtoaddress(mSigObj, 2.2) decTx = self.nodes[0].gettransaction(txId) @@ -150,9 +160,9 @@ addr2Obj = self.nodes[2].validateaddress(addr2) self.nodes[1].addmultisigaddress( - 2, [addr1Obj['pubkey'], addr2Obj['pubkey']]) + 2, [addr1Obj['pubkey'], addr2Obj['pubkey']])['address'] mSigObj = self.nodes[2].addmultisigaddress( - 2, [addr1Obj['pubkey'], addr2Obj['pubkey']]) + 2, [addr1Obj['pubkey'], addr2Obj['pubkey']])['address'] mSigObjValid = self.nodes[2].validateaddress(mSigObj) txId = self.nodes[0].sendtoaddress(mSigObj, 2.2) diff --git a/test/functional/timing.json b/test/functional/timing.json --- a/test/functional/timing.json +++ b/test/functional/timing.json @@ -1,55 +1,55 @@ [ { "name": "abandonconflict.py", - "time": 15 + "time": 34 }, { "name": "abc-checkdatasig-activation.py", - "time": 22 + "time": 21 }, { "name": "abc-cmdline.py", - "time": 10 + "time": 21 }, { "name": "abc-finalize-block.py", - "time": 7 + "time": 40 }, { "name": "abc-high_priority_transaction.py", - "time": 20 + "time": 21 }, { "name": "abc-magnetic-anomaly-activation.py", - "time": 6 + "time": 24 }, { "name": "abc-magnetic-anomaly-mining.py", - "time": 29 + "time": 40 }, { "name": "abc-mempool-accept-txn.py", - "time": 13 + "time": 16 }, { "name": "abc-p2p-compactblocks.py", - "time": 411 + "time": 341 }, { "name": "abc-p2p-fullblocktest.py", - "time": 79 + "time": 55 }, { "name": "abc-parkedchain.py", - "time": 13 + "time": 25 }, { "name": "abc-replay-protection.py", - "time": 4 + "time": 11 }, { "name": "abc-rpc.py", - "time": 2 + "time": 3 }, { "name": "abc-sync-chain.py", @@ -61,7 +61,7 @@ }, { "name": "assumevalid.py", - "time": 12 + "time": 18 }, { "name": "bip65-cltv-p2p.py", @@ -69,11 +69,11 @@ }, { "name": "bip68-112-113-p2p.py", - "time": 39 + "time": 25 }, { "name": "bip68-sequence.py", - "time": 64 + "time": 43 }, { "name": "bipdersig-p2p.py", @@ -81,27 +81,31 @@ }, { "name": "bitcoin_cli.py", - "time": 13 + "time": 18 }, { "name": "blockchain.py", - "time": 40 + "time": 24 }, { "name": "dbcrash.py", - "time": 1320 + "time": 1299 }, { "name": "decodescript.py", "time": 3 }, + { + "name": "deprecated_rpc.py", + "time": 3 + }, { "name": "disablewallet.py", "time": 2 }, { "name": "disconnect_ban.py", - "time": 20 + "time": 8 }, { "name": "example_test.py", @@ -109,7 +113,7 @@ }, { "name": "fundrawtransaction.py", - "time": 47 + "time": 50 }, { "name": "getblocktemplate_longpoll.py", @@ -117,31 +121,31 @@ }, { "name": "getchaintips.py", - "time": 28 + "time": 16 }, { "name": "httpbasics.py", - "time": 4 + "time": 9 }, { "name": "import-rescan.py", - "time": 16 + "time": 18 }, { "name": "importmulti.py", - "time": 26 + "time": 22 }, { "name": "importprunedfunds.py", - "time": 4 + "time": 13 }, { "name": "invalidateblock.py", - "time": 8 + "time": 9 }, { "name": "invalidblockrequest.py", - "time": 4 + "time": 12 }, { "name": "invalidtxrequest.py", @@ -149,11 +153,11 @@ }, { "name": "keypool-topup.py", - "time": 32 + "time": 29 }, { "name": "keypool.py", - "time": 37 + "time": 9 }, { "name": "listsinceblock.py", @@ -161,43 +165,43 @@ }, { "name": "listtransactions.py", - "time": 9 + "time": 15 }, { "name": "maxuploadtarget.py", - "time": 26 + "time": 24 }, { "name": "mempool_limit.py", - "time": 10 + "time": 22 }, { "name": "mempool_packages.py", - "time": 26 + "time": 55 }, { "name": "mempool_persist.py", - "time": 46 + "time": 17 }, { "name": "mempool_reorg.py", - "time": 8 + "time": 5 }, { "name": "mempool_resurrect_test.py", - "time": 4 + "time": 11 }, { "name": "mempool_spendcoinbase.py", - "time": 4 + "time": 3 }, { "name": "merkle_blocks.py", - "time": 4 + "time": 5 }, { "name": "minchainwork.py", - "time": 16 + "time": 7 }, { "name": "mining.py", @@ -205,11 +209,11 @@ }, { "name": "multi_rpc.py", - "time": 10 + "time": 13 }, { "name": "multiwallet.py", - "time": 8 + "time": 11 }, { "name": "net.py", @@ -217,11 +221,11 @@ }, { "name": "notifications.py", - "time": 20 + "time": 19 }, { "name": "nulldummy.py", - "time": 5 + "time": 3 }, { "name": "p2p-acceptblock.py", @@ -229,15 +233,15 @@ }, { "name": "p2p-compactblocks.py", - "time": 30 + "time": 41 }, { "name": "p2p-feefilter.py", - "time": 19 + "time": 43 }, { "name": "p2p-fullblocktest.py", - "time": 133 + "time": 131 }, { "name": "p2p-leaktests.py", @@ -245,15 +249,15 @@ }, { "name": "p2p-mempool.py", - "time": 12 + "time": 3 }, { "name": "p2p-timeouts.py", - "time": 65 + "time": 64 }, { "name": "preciousblock.py", - "time": 10 + "time": 7 }, { "name": "prioritise_transaction.py", @@ -261,39 +265,39 @@ }, { "name": "proxy_test.py", - "time": 7 + "time": 11 }, { "name": "pruning.py", - "time": 1527 + "time": 1498 }, { "name": "rawtransactions.py", - "time": 38 + "time": 30 }, { "name": "reindex.py", - "time": 27 + "time": 14 }, { "name": "resendwallettransactions.py", - "time": 14 + "time": 6 }, { "name": "rest.py", - "time": 32 + "time": 10 }, { "name": "rpcbind_test.py", - "time": 27 + "time": 37 }, { "name": "rpcnamedargs.py", - "time": 3 + "time": 2 }, { "name": "sendheaders.py", - "time": 42 + "time": 18 }, { "name": "signmessages.py", @@ -305,58 +309,58 @@ }, { "name": "txn_clone.py", - "time": 5 + "time": 13 }, { "name": "txn_clone.py --mineblock", - "time": 8 + "time": 6 }, { "name": "txn_doublespend.py", - "time": 24 + "time": 9 }, { "name": "txn_doublespend.py --mineblock", - "time": 16 + "time": 6 }, { "name": "uptime.py", - "time": 3 + "time": 2 }, { "name": "wallet.py", - "time": 75 + "time": 41 }, { "name": "wallet_accounts.py", - "time": 26 + "time": 13 }, { "name": "wallet_dump.py", - "time": 12 + "time": 7 }, { "name": "wallet_encryption.py", - "time": 27 + "time": 20 }, { "name": "wallet_hd.py", - "time": 142 + "time": 35 }, { "name": "wallet_receivedby.py", - "time": 21 + "time": 27 }, { "name": "walletbackup.py", - "time": 130 + "time": 163 }, { "name": "zapwallettxes.py", - "time": 26 + "time": 37 }, { "name": "zmq_test.py", - "time": 7 + "time": 35 } ] \ No newline at end of file diff --git a/test/functional/wallet_accounts.py b/test/functional/wallet_accounts.py --- a/test/functional/wallet_accounts.py +++ b/test/functional/wallet_accounts.py @@ -124,7 +124,7 @@ for x in range(10): addresses.append(node.getnewaddress()) multisig_address = node.addmultisigaddress( - 5, addresses, label.name) + 5, addresses, label.name)['address'] label.add_address(multisig_address) label.verify(node) node.sendfrom("", multisig_address, 50)