fixed collateral issue, debug messages, no fees, changed function names, progress bar

This commit is contained in:
Evan Duffield 2014-09-04 13:21:47 -07:00
parent 0099670008
commit 6eb5ba6419
7 changed files with 67 additions and 60 deletions

View File

@ -222,6 +222,8 @@ void CDarkSendPool::Check()
// until the transaction is either complete or fails. // until the transaction is either complete or fails.
// //
void CDarkSendPool::ChargeFees(){ void CDarkSendPool::ChargeFees(){
return;
if(fMasterNode) { if(fMasterNode) {
int i = 0; int i = 0;
// who didn't sign? // who didn't sign?
@ -253,7 +255,7 @@ void CDarkSendPool::CheckTimeout(){
// catching hanging sessions // catching hanging sessions
if(!fMasterNode) { if(!fMasterNode) {
if(state == POOL_STATUS_TRANSMISSION) { if(state == POOL_STATUS_TRANSMISSION) {
if(fDebug) LogPrintf("CDarkSendPool::CheckTimeout() -- SESSION COMPLETED -- CHECKING\n"); if(fDebug) LogPrintf("CDarkSendPool::CheckTimeout() -- Session complete -- Running Check()\n");
Check(); Check();
} }
} }
@ -263,7 +265,7 @@ void CDarkSendPool::CheckTimeout(){
vector<CDarksendQueue>::iterator it; vector<CDarksendQueue>::iterator it;
for(it=vecDarksendQueue.begin();it<vecDarksendQueue.end();it++){ for(it=vecDarksendQueue.begin();it<vecDarksendQueue.end();it++){
if((*it).IsExpired()){ if((*it).IsExpired()){
LogPrintf("CDarkSendPool::CheckTimeout() : REMOVING EXPIRED QUEUE ENTRY - %d\n", c); if(fDebug) LogPrintf("CDarkSendPool::CheckTimeout() : Removing expired queue entry - %d\n", c);
vecDarksendQueue.erase(it); vecDarksendQueue.erase(it);
break; break;
} }
@ -281,7 +283,7 @@ void CDarkSendPool::CheckTimeout(){
vector<CDarkSendEntry>::iterator it2; vector<CDarkSendEntry>::iterator it2;
for(it2=vec->begin();it2<vec->end();it2++){ for(it2=vec->begin();it2<vec->end();it2++){
if((*it2).IsExpired()){ if((*it2).IsExpired()){
LogPrintf("CDarkSendPool::CheckTimeout() : REMOVING EXPIRED ENTRY - %d\n", c); if(fDebug) LogPrintf("CDarkSendPool::CheckTimeout() : Removing expired entry - %d\n", c);
vec->erase(it2); vec->erase(it2);
if(entries.size() == 0 && myEntries.size() == 0){ if(entries.size() == 0 && myEntries.size() == 0){
SetNull(true); SetNull(true);
@ -306,7 +308,7 @@ void CDarkSendPool::CheckTimeout(){
} }
} else if(GetTimeMillis()-lastTimeChanged >= 30000){ } else if(GetTimeMillis()-lastTimeChanged >= 30000){
if(fDebug) LogPrintf("CDarkSendPool::CheckTimeout() -- SESSION TIMED OUT (30) -- RESETTING\n"); if(fDebug) LogPrintf("CDarkSendPool::CheckTimeout() -- Session timed out (30s) -- resetting\n");
SetNull(); SetNull();
UnlockCoins(); UnlockCoins();
@ -316,7 +318,7 @@ void CDarkSendPool::CheckTimeout(){
if(state == POOL_STATUS_SIGNING && GetTimeMillis()-lastTimeChanged >= 10000 ) { if(state == POOL_STATUS_SIGNING && GetTimeMillis()-lastTimeChanged >= 10000 ) {
if(fDebug) LogPrintf("CDarkSendPool::CheckTimeout() -- SESSION TIMED OUT -- RESETTING\n"); if(fDebug) LogPrintf("CDarkSendPool::CheckTimeout() -- Session timed out -- restting\n");
ChargeFees(); ChargeFees();
SetNull(); SetNull();
UnlockCoins(); UnlockCoins();
@ -357,7 +359,7 @@ bool CDarkSendPool::SignatureValid(const CScript& newSig, const CTxIn& newVin){
txNew.vin[n].scriptSig = newSig; txNew.vin[n].scriptSig = newSig;
if(fDebug) LogPrintf("CDarkSendPool::SignatureValid() - Sign with sig %s\n", newSig.ToString().substr(0,24).c_str()); if(fDebug) LogPrintf("CDarkSendPool::SignatureValid() - Sign with sig %s\n", newSig.ToString().substr(0,24).c_str());
if (!VerifyScript(txNew.vin[n].scriptSig, sigPubKey, txNew, n, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, 0)){ if (!VerifyScript(txNew.vin[n].scriptSig, sigPubKey, txNew, n, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, 0)){
if(fDebug) LogPrintf("CDarkSendPool::SignatureValid() - Signing - ERROR signing input %u\n", n); if(fDebug) LogPrintf("CDarkSendPool::SignatureValid() - Signing - Error signing input %u\n", n);
return false; return false;
} }
} }
@ -509,7 +511,7 @@ bool CDarkSendPool::SignaturesComplete(){
// Execute a darksend denomination via a masternode. // Execute a darksend denomination via a masternode.
// This is only ran from clients // This is only ran from clients
// //
void CDarkSendPool::SendMoney(const CTransaction& collateral, std::vector<CTxIn>& vin, std::vector<CTxOut>& vout, int64& fee, int64 amount){ void CDarkSendPool::SendDarksendDenominate(const CTransaction& collateral, std::vector<CTxIn>& vin, std::vector<CTxOut>& vout, int64& fee, int64 amount){
// lock the funds we're going to use // lock the funds we're going to use
BOOST_FOREACH(CTxIn in, collateral.vin) BOOST_FOREACH(CTxIn in, collateral.vin)
lockedCoins.push_back(in); lockedCoins.push_back(in);
@ -519,7 +521,7 @@ void CDarkSendPool::SendMoney(const CTransaction& collateral, std::vector<CTxIn>
// we should already be connected to a masternode // we should already be connected to a masternode
if(!sessionFoundMasternode){ if(!sessionFoundMasternode){
LogPrintf("CDarkSendPool::SendMoney() - No masternode has been selected yet.\n"); LogPrintf("CDarkSendPool::SendDarksendDenominate() - No masternode has been selected yet.\n");
UnlockCoins(); UnlockCoins();
SetNull(true); SetNull(true);
return; return;
@ -529,11 +531,11 @@ void CDarkSendPool::SendMoney(const CTransaction& collateral, std::vector<CTxIn>
return; return;
if(fMasterNode) { if(fMasterNode) {
LogPrintf("CDarkSendPool::SendMoney() - DarkSend from a masternode is not supported currently.\n"); LogPrintf("CDarkSendPool::SendDarksendDenominate() - DarkSend from a masternode is not supported currently.\n");
return; return;
} }
LogPrintf("CDarkSendPool::SendMoney() - Added transaction to pool.\n"); LogPrintf("CDarkSendPool::SendDarksendDenominate() - Added transaction to pool.\n");
ClearLastMessage(); ClearLastMessage();
@ -581,8 +583,6 @@ bool CDarkSendPool::StatusUpdate(int newState, int newEntriesCount, int newAccep
UpdateState(newState); UpdateState(newState);
entriesCount = newEntriesCount; entriesCount = newEntriesCount;
LogPrintf("DarkSendStatusUpdate - state: %i entriesCount: %i accepted: %i error: %s \n", newState, newEntriesCount, newAccepted, error.c_str());
if(newAccepted != -1) { if(newAccepted != -1) {
lastEntryAccepted = newAccepted; lastEntryAccepted = newAccepted;
countEntriesAccepted += newAccepted; countEntriesAccepted += newAccepted;
@ -1232,7 +1232,7 @@ bool CDarkSendPool::DoAutomaticDenominating(bool fDryRun)
} }
// Submit transaction to the pool if we get here // Submit transaction to the pool if we get here
std::string strError = pwalletMain->DarkSendDenominate(minRounds, maxAmount); std::string strError = pwalletMain->PrepareDarksendDenominate(minRounds, maxAmount);
LogPrintf("DoAutomaticDenominating : Running darksend denominate. Return '%s'\n", strError.c_str()); LogPrintf("DoAutomaticDenominating : Running darksend denominate. Return '%s'\n", strError.c_str());
if(strError == "") return true; if(strError == "") return true;

View File

@ -396,7 +396,7 @@ public:
// are all inputs signed? // are all inputs signed?
bool SignaturesComplete(); bool SignaturesComplete();
// as a client, send a transaction to a masternode to start the denomination process // as a client, send a transaction to a masternode to start the denomination process
void SendMoney(const CTransaction& collateral, std::vector<CTxIn>& vin, std::vector<CTxOut>& vout, int64& fee, int64 amount); void SendDarksendDenominate(const CTransaction& collateral, std::vector<CTxIn>& vin, std::vector<CTxOut>& vout, int64& fee, int64 amount);
// get masternode updates about the progress of darksend // get masternode updates about the progress of darksend
bool StatusUpdate(int newState, int newEntriesCount, int newAccepted, std::string& error, int newSessionID=0); bool StatusUpdate(int newState, int newEntriesCount, int newAccepted, std::string& error, int newSessionID=0);

View File

@ -3830,8 +3830,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
} }
else if (strCommand == "dsf") { //DarkSend Final tx else if (strCommand == "dsf") { //DarkSend Final tx
LogPrintf("got RelayDarkSendFinalTransaction\n");
if (pfrom->nVersion != darkSendPool.MIN_PEER_PROTO_VERSION) { if (pfrom->nVersion != darkSendPool.MIN_PEER_PROTO_VERSION) {
return true; return true;
} }
@ -3846,7 +3844,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
vRecv >> sessionID >> txNew; vRecv >> sessionID >> txNew;
if(darkSendPool.sessionID != sessionID){ if(darkSendPool.sessionID != sessionID){
LogPrintf("dsc - message doesn't match current darksend session %d %d\n", darkSendPool.sessionID, sessionID); if (fDebug) LogPrintf("dsf - message doesn't match current darksend session %d %d\n", darkSendPool.sessionID, sessionID);
return true; return true;
} }
@ -3870,7 +3868,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
vRecv >> sessionID >> error >> lastMessage; vRecv >> sessionID >> error >> lastMessage;
if(darkSendPool.sessionID != sessionID){ if(darkSendPool.sessionID != sessionID){
LogPrintf("dsc - message doesn't match current darksend session %d %d\n", darkSendPool.sessionID, sessionID); if (fDebug) LogPrintf("dsc - message doesn't match current darksend session %d %d\n", darkSendPool.sessionID, sessionID);
return true; return true;
} }
@ -3878,6 +3876,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
} }
else if (strCommand == "dsa") { //DarkSend Acceptable else if (strCommand == "dsa") { //DarkSend Acceptable
if (pfrom->nVersion != darkSendPool.MIN_PEER_PROTO_VERSION) {
return true;
}
int64 nAmount; int64 nAmount;
vRecv >> nAmount; vRecv >> nAmount;
@ -3898,6 +3900,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
return true; return true;
} }
} else if (strCommand == "dsq") { //DarkSend Queue } else if (strCommand == "dsq") { //DarkSend Queue
if (pfrom->nVersion != darkSendPool.MIN_PEER_PROTO_VERSION) {
return true;
}
CDarksendQueue dsq; CDarksendQueue dsq;
vRecv >> dsq; vRecv >> dsq;
@ -3910,7 +3916,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
} }
if(dsq.IsExpired()) return true; if(dsq.IsExpired()) return true;
LogPrintf("new darksend queue object - %s\n", addr.ToString().c_str()); if (fDebug) LogPrintf("new darksend queue object - %s\n", addr.ToString().c_str());
vecDarksendQueue.push_back(dsq); vecDarksendQueue.push_back(dsq);
dsq.Relay(); dsq.Relay();
dsq.time = GetTime(); dsq.time = GetTime();
@ -4067,8 +4073,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
std::string error; std::string error;
vRecv >> sessionID >> state >> entriesCount >> accepted >> error; vRecv >> sessionID >> state >> entriesCount >> accepted >> error;
LogPrintf("dssu - state: %i entriesCount: %i accepted: %i error: %s \n", state, entriesCount, accepted, error.c_str());
if((accepted != 1 && accepted != 0) && darkSendPool.sessionID != sessionID){ if((accepted != 1 && accepted != 0) && darkSendPool.sessionID != sessionID){
LogPrintf("dsc - message doesn't match current darksend session %d %d\n", darkSendPool.sessionID, sessionID); LogPrintf("dssu - message doesn't match current darksend session %d %d\n", darkSendPool.sessionID, sessionID);
return true; return true;
} }
@ -4724,7 +4732,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
{ {
// Relay // Relay
pfrom->hashCheckpointKnown = checkpoint.hashCheckpoint; pfrom->hashCheckpointKnown = checkpoint.hashCheckpoint;
LogPrintf("!!! ENFORCING PAYMENTS %"PRI64u"\n", checkpoint.enforcingPaymentsTime);
enforceMasternodePaymentsTime = checkpoint.enforcingPaymentsTime; enforceMasternodePaymentsTime = checkpoint.enforcingPaymentsTime;
LOCK(cs_vNodes); LOCK(cs_vNodes);

View File

@ -251,14 +251,7 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label_7">
<property name="text"> <property name="text">
<string>Avg Rounds</string> <string>Completion</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="darksendAvgRounds">
<property name="text">
<string>X/X2</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -269,6 +262,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1">
<widget class="QProgressBar" name="darksendProgress">
<property name="maximumSize">
<size>
<width>154</width>
<height>16777215</height>
</size>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
</item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QLabel" name="labelAnonymized"> <widget class="QLabel" name="labelAnonymized">
<property name="font"> <property name="font">
@ -288,9 +294,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>130</y> <y>140</y>
<width>251</width> <width>251</width>
<height>61</height> <height>51</height>
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">

View File

@ -241,9 +241,10 @@ void OverviewPage::darkSendStatus()
ui->darksendStatus->setText(""); ui->darksendStatus->setText("");
std::ostringstream convert; std::ostringstream convert;
convert << pwalletMain->GetAverageAnonymizedRounds() << "/" << nDarksendRounds; ui->darksendProgress->setValue(((double)pwalletMain->GetAverageAnonymizedRounds() / (double)nDarksendRounds)*100);
convert << "Inputs have an average of " << pwalletMain->GetAverageAnonymizedRounds() << " of " << nDarksendRounds << " rounds";
QString s(convert.str().c_str()); QString s(convert.str().c_str());
ui->darksendAvgRounds->setText(s); ui->darksendProgress->setToolTip(s);
} }
return; return;
@ -287,9 +288,10 @@ void OverviewPage::darkSendStatus()
ui->darksendEnabled->setText("Enabled"); ui->darksendEnabled->setText("Enabled");
std::ostringstream convert; std::ostringstream convert;
convert << pwalletMain->GetAverageAnonymizedRounds() << "/" << nDarksendRounds; ui->darksendProgress->setValue(((double)pwalletMain->GetAverageAnonymizedRounds() / (double)nDarksendRounds)*100);
convert << "Inputs have an average of " << pwalletMain->GetAverageAnonymizedRounds() << " of " << nDarksendRounds << " rounds";
QString s(convert.str().c_str()); QString s(convert.str().c_str());
ui->darksendAvgRounds->setText(s); ui->darksendProgress->setToolTip(s);
} }
@ -304,7 +306,7 @@ void OverviewPage::darkSendStatus()
if(state == POOL_STATUS_ACCEPTING_ENTRIES) { if(state == POOL_STATUS_ACCEPTING_ENTRIES) {
if(entries == 0) { if(entries == 0) {
convert << "Idle"; convert << "Darksend is idle";
showingDarkSendMessage = 0; showingDarkSendMessage = 0;
} else if (accepted == 1) { } else if (accepted == 1) {
convert << "Your transaction was accepted into the pool!"; convert << "Your transaction was accepted into the pool!";
@ -324,17 +326,17 @@ void OverviewPage::darkSendStatus()
else if(showingDarkSendMessage % 70 <= 30) convert << "Found enough users => SIGNING ( waiting.. )"; else if(showingDarkSendMessage % 70 <= 30) convert << "Found enough users => SIGNING ( waiting.. )";
else if(showingDarkSendMessage % 70 <= 40) convert << "Found enough users => SIGNING ( waiting... )"; else if(showingDarkSendMessage % 70 <= 40) convert << "Found enough users => SIGNING ( waiting... )";
} else if(state == POOL_STATUS_TRANSMISSION) { } else if(state == POOL_STATUS_TRANSMISSION) {
convert << "Found enough users => TRANSMISSION"; convert << "Status => TRANSMISSION";
} else if (state == POOL_STATUS_IDLE) { } else if (state == POOL_STATUS_IDLE) {
convert << "Found enough users => POOL_STATUS_IDLE"; convert << "Status => POOL_STATUS_IDLE";
} else if (state == POOL_STATUS_FINALIZE_TRANSACTION) { } else if (state == POOL_STATUS_FINALIZE_TRANSACTION) {
convert << "Found enough users => POOL_STATUS_FINALIZE_TRANSACTION"; convert << "Status => POOL_STATUS_FINALIZE_TRANSACTION";
} else if(state == POOL_STATUS_ERROR) { } else if(state == POOL_STATUS_ERROR) {
convert << "Found enough users => ERROR : " << darkSendPool.lastMessage; convert << "Status => ERROR : " << darkSendPool.lastMessage;
} else if(state == POOL_STATUS_SUCCESS) { } else if(state == POOL_STATUS_SUCCESS) {
convert << "Found enough users => SUCCESS : " << darkSendPool.lastMessage; convert << "Status => SUCCESS : " << darkSendPool.lastMessage;
} else { } else {
convert << "Found enough users => UNKNOWN STATE : ID=" << state; convert << "Status => UNKNOWN STATE : ID=" << state;
} }
if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) darkSendPool.Check(); if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) darkSendPool.Check();

View File

@ -1669,9 +1669,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
return true; return true;
} }
string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee, AvailableCoinsType coin_type) string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee, AvailableCoinsType coin_type)
{ {
CReserveKey reservekey(this); CReserveKey reservekey(this);
@ -1737,13 +1734,10 @@ int64 CWallet::GetTotalValue(std::vector<CTxIn> vCoins) {
return nTotalValue; return nTotalValue;
} }
string CWallet::DarkSendDenominate(int minRounds, int maxAmount) string CWallet::PrepareDarksendDenominate(int minRounds, int maxAmount)
{ {
if (IsLocked()) if (IsLocked())
{
return _("Error: Wallet locked, unable to create transaction!"); return _("Error: Wallet locked, unable to create transaction!");
}
if(darkSendPool.GetState() != POOL_STATUS_ERROR && darkSendPool.GetState() != POOL_STATUS_SUCCESS){ if(darkSendPool.GetState() != POOL_STATUS_ERROR && darkSendPool.GetState() != POOL_STATUS_SUCCESS){
if(darkSendPool.GetMyTransactionCount() > 0){ if(darkSendPool.GetMyTransactionCount() > 0){
@ -1751,8 +1745,7 @@ string CWallet::DarkSendDenominate(int minRounds, int maxAmount)
} }
} }
CTransaction txCollateral; CTransaction txCollateral;
int64 nFeeRet = 0.0125*COIN; ///need to get a better fee calc int64 nFeeRet = 0.0125*COIN; ///need to get a better fee calc
// ** find the coins we'll use // ** find the coins we'll use
@ -1830,18 +1823,19 @@ string CWallet::DarkSendDenominate(int minRounds, int maxAmount)
LockCoin(v.prevout); LockCoin(v.prevout);
} }
//** denominate our funds ** // // denominate our funds
int64 nValueLeft = nTotalValue; int64 nValueLeft = nTotalValue;
std::vector<CTxOut> vOut; std::vector<CTxOut> vOut;
int nOutputs = 0; int nOutputs = 0;
//LogPrintf("nValueLeft %"PRI64d"\n", nValueLeft/COIN); // Make outputs by looping through denominations, from large to small
BOOST_FOREACH(int64 v, darkSendDenominations){ BOOST_FOREACH(int64 v, darkSendDenominations){
nOutputs = 0; nOutputs = 0;
// add each output up to 10 times until it can't be added again
while(nValueLeft - v >= 0 && nOutputs <= 10) { while(nValueLeft - v >= 0 && nOutputs <= 10) {
CScript scriptChange; CScript scriptChange;
CPubKey vchPubKey; CPubKey vchPubKey;
//use a unique change address
assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
scriptChange.SetDestination(vchPubKey.GetID()); scriptChange.SetDestination(vchPubKey.GetID());
reservekey.KeepKey(); reservekey.KeepKey();
@ -1849,16 +1843,15 @@ string CWallet::DarkSendDenominate(int minRounds, int maxAmount)
CTxOut o(v, scriptChange); CTxOut o(v, scriptChange);
vOut.push_back(o); vOut.push_back(o);
//increment outputs and subtract denomination amount
nOutputs++; nOutputs++;
nValueLeft -= v; nValueLeft -= v;
//LogPrintf(" -- denom %"PRI64d"\n", v/COIN);
//LogPrintf("nValueLeft %"PRI64d"\n", nValueLeft/COIN);
} }
if(nValueLeft == 0) break; if(nValueLeft == 0) break;
} }
// if we have anything left over, send it back as change
if(nValueLeft > 0){ if(nValueLeft > 0){
CScript scriptChange; CScript scriptChange;
CPubKey vchPubKey; CPubKey vchPubKey;
@ -1872,7 +1865,7 @@ string CWallet::DarkSendDenominate(int minRounds, int maxAmount)
nOutputs++; nOutputs++;
} }
darkSendPool.SendMoney(txCollateral, vCoins, vOut, nFeeRet, nValueIn); darkSendPool.SendDarksendDenominate(txCollateral, vCoins, vOut, nFeeRet, nValueIn);
return ""; return "";
} }

View File

@ -205,8 +205,7 @@ public:
bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey); bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey);
std::string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false, AvailableCoinsType coin_type=ALL_COINS); std::string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false, AvailableCoinsType coin_type=ALL_COINS);
std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false, AvailableCoinsType coin_type=ALL_COINS); std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false, AvailableCoinsType coin_type=ALL_COINS);
std::string DarkSendMoney(const CTxDestination &address, int64 nValue); std::string PrepareDarksendDenominate(int minRounds, int maxAmount);
std::string DarkSendDenominate(int minRounds, int maxAmount);
bool NewKeyPool(); bool NewKeyPool();
bool TopUpKeyPool(); bool TopUpKeyPool();