From 58c0f150a424e9a25a7c1d5846b28af7848bdefb Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 19 Jun 2015 04:42:25 +0300 Subject: [PATCH] fix dsc --- src/darksend.cpp | 10 +++++----- src/darksend.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/darksend.cpp b/src/darksend.cpp index 0de11ba1b..ba050286a 100644 --- a/src/darksend.cpp +++ b/src/darksend.cpp @@ -370,15 +370,15 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand int sessionIDMessage; bool error; - std::string lastMessage; - vRecv >> sessionIDMessage >> error >> lastMessage; + int errorID; + vRecv >> sessionIDMessage >> error >> errorID; if(sessionID != sessionIDMessage){ if (fDebug) LogPrintf("dsc - message doesn't match current Darksend session %d %d\n", darkSendPool.sessionID, sessionIDMessage); return; } - darkSendPool.CompletedTransaction(error, lastMessage); + darkSendPool.CompletedTransaction(error, errorID); } } @@ -1355,7 +1355,7 @@ void CDarksendPool::NewBlock() } // Darksend transaction was completed (failed or successful) -void CDarksendPool::CompletedTransaction(bool error, std::string lastMessageNew) +void CDarksendPool::CompletedTransaction(bool error, int errorID) { if(fMasterNode) return; @@ -1376,7 +1376,7 @@ void CDarksendPool::CompletedTransaction(bool error, std::string lastMessageNew) // To avoid race conditions, we'll only let DS run once per block cachedLastSuccess = chainActive.Tip()->nHeight; } - lastMessage = lastMessageNew; + lastMessage = GetMessageByID(errorID); completedTransaction = true; } diff --git a/src/darksend.h b/src/darksend.h index b4c96cc2d..65ec58fe2 100644 --- a/src/darksend.h +++ b/src/darksend.h @@ -483,7 +483,7 @@ public: bool GetLastValidBlockHash(uint256& hash, int mod=1, int nBlockHeight=0); /// Process a new block void NewBlock(); - void CompletedTransaction(bool error, std::string lastMessageNew); + void CompletedTransaction(bool error, int errorID); void ClearLastMessage(); /// Used for liquidity providers bool SendRandomPaymentToSelf();