[wallet] rpc: Drop misleading option in importprunedfunds

This commit is contained in:
MarcoFalke
2016-08-24 19:21:27 +02:00
committed by lateminer
parent 8bca020397
commit 2b9c31046b
2 changed files with 13 additions and 21 deletions

View File

@@ -250,14 +250,13 @@ UniValue importprunedfunds(const UniValue& params, bool fHelp)
if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue;
if (fHelp || params.size() < 2 || params.size() > 3)
if (fHelp || params.size() != 2)
throw runtime_error(
"importprunedfunds\n"
"\nImports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.\n"
"\nArguments:\n"
"1. \"rawtransaction\" (string, required) A raw transaction in hex funding an already-existing address in wallet\n"
"2. \"txoutproof\" (string, required) The hex output from gettxoutproof that contains the transaction\n"
"3. \"label\" (string, optional) An optional label\n"
);
CTransaction tx;
@@ -270,10 +269,6 @@ UniValue importprunedfunds(const UniValue& params, bool fHelp)
CMerkleBlock merkleBlock;
ssMB >> merkleBlock;
string strLabel = "";
if (params.size() == 3)
strLabel = params[2].get_str();
//Search partial merkle tree in proof for our transaction and index in valid block
vector<uint256> vMatch;
vector<unsigned int> vIndex;