Merge pull request #294 from somegeekintn/no_min
Remove restrictions on spending dust
This commit is contained in:
commit
2b26db7f5a
|
@ -251,7 +251,6 @@ static const CRPCCommand vRPCCommands[] =
|
|||
{ "settxfee", &settxfee, false, false, true },
|
||||
{ "getblocktemplate", &getblocktemplate, true, false, false },
|
||||
{ "submitblock", &submitblock, false, false, false },
|
||||
{ "setmininput", &setmininput, false, false, false },
|
||||
{ "listsinceblock", &listsinceblock, false, false, true },
|
||||
{ "dumpprivkey", &dumpprivkey, true, false, true },
|
||||
{ "importprivkey", &importprivkey, false, false, true },
|
||||
|
@ -1173,7 +1172,6 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
|
|||
if (strMethod == "getnetworkhashps" && n > 1) ConvertTo<boost::int64_t>(params[1]);
|
||||
if (strMethod == "sendtoaddress" && n > 1) ConvertTo<double>(params[1]);
|
||||
if (strMethod == "settxfee" && n > 0) ConvertTo<double>(params[0]);
|
||||
if (strMethod == "setmininput" && n > 0) ConvertTo<double>(params[0]);
|
||||
if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo<boost::int64_t>(params[1]);
|
||||
if (strMethod == "getreceivedbyaccount" && n > 1) ConvertTo<boost::int64_t>(params[1]);
|
||||
if (strMethod == "listreceivedbyaddress" && n > 0) ConvertTo<boost::int64_t>(params[0]);
|
||||
|
|
|
@ -199,7 +199,6 @@ extern json_spirit::Value getblockcount(const json_spirit::Array& params, bool f
|
|||
extern json_spirit::Value getbestblockhash(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value getdifficulty(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value settxfee(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value setmininput(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value getrawmempool(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value getblockhash(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value getblock(const json_spirit::Array& params, bool fHelp);
|
||||
|
|
|
@ -635,12 +635,6 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||
InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction."));
|
||||
}
|
||||
|
||||
if (mapArgs.count("-mininput"))
|
||||
{
|
||||
if (!ParseMoney(mapArgs["-mininput"], nMinimumInputValue))
|
||||
return InitError(strprintf(_("Invalid amount for -mininput=<amount>: '%s'"), mapArgs["-mininput"].c_str()));
|
||||
}
|
||||
|
||||
strWalletFile = GetArg("-wallet", "wallet.dat");
|
||||
|
||||
// ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
|
||||
|
|
|
@ -74,7 +74,6 @@ int64 nHPSTimerStart = 0;
|
|||
|
||||
// Settings
|
||||
int64 nTransactionFee = 0;
|
||||
int64 nMinimumInputValue = DUST_HARD_LIMIT;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -106,7 +106,6 @@ extern unsigned int nCoinCacheSize;
|
|||
|
||||
// Settings
|
||||
extern int64 nTransactionFee;
|
||||
extern int64 nMinimumInputValue;
|
||||
|
||||
// Minimum disk space required - used in CheckDiskSpace()
|
||||
static const uint64 nMinDiskSpace = 52428800;
|
||||
|
|
|
@ -88,7 +88,6 @@ Value getinfo(const Array& params, bool fHelp)
|
|||
obj.push_back(Pair("keypoolsize", (int)pwalletMain->GetKeyPoolSize()));
|
||||
}
|
||||
obj.push_back(Pair("paytxfee", ValueFromAmount(nTransactionFee)));
|
||||
obj.push_back(Pair("mininput", ValueFromAmount(nMinimumInputValue)));
|
||||
if (pwalletMain && pwalletMain->IsCrypted())
|
||||
obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime));
|
||||
obj.push_back(Pair("errors", GetWarnings("statusbar")));
|
||||
|
@ -254,23 +253,6 @@ Value getaddressesbyaccount(const Array& params, bool fHelp)
|
|||
}
|
||||
|
||||
|
||||
Value setmininput(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() < 1 || params.size() > 1)
|
||||
throw runtime_error(
|
||||
"setmininput <amount>\n"
|
||||
"<amount> is a real and is rounded to the nearest 0.00000001");
|
||||
|
||||
// Amount
|
||||
int64 nAmount = 0;
|
||||
if (params[0].get_real() != 0.0)
|
||||
nAmount = AmountFromValue(params[0]); // rejects 0.0 amounts
|
||||
|
||||
nMinimumInputValue = nAmount;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Value sendtoaddress(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() < 2 || params.size() > 4)
|
||||
|
|
|
@ -1014,8 +1014,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
|
|||
continue;
|
||||
|
||||
for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
|
||||
if (!(pcoin->IsSpent(i)) && IsMine(pcoin->vout[i]) &&
|
||||
!IsLockedCoin((*it).first, i) && pcoin->vout[i].nValue >= nMinimumInputValue &&
|
||||
if (!(pcoin->IsSpent(i)) && IsMine(pcoin->vout[i]) && !IsLockedCoin((*it).first, i) &&
|
||||
(!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i)))
|
||||
vCoins.push_back(COutput(pcoin, i, pcoin->GetDepthInMainChain()));
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ public:
|
|||
bool IsMine(const CTransaction& tx) const
|
||||
{
|
||||
BOOST_FOREACH(const CTxOut& txout, tx.vout)
|
||||
if (IsMine(txout) && txout.nValue >= nMinimumInputValue)
|
||||
if (IsMine(txout))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue