|
|
@ -22,8 +22,6 @@ |
|
|
|
#include <boost/foreach.hpp> |
|
|
|
#include <boost/foreach.hpp> |
|
|
|
#include <boost/thread.hpp> |
|
|
|
#include <boost/thread.hpp> |
|
|
|
|
|
|
|
|
|
|
|
static uint64_t nAccountingEntryNumber = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static std::atomic<unsigned int> nWalletDBUpdateCounter; |
|
|
|
static std::atomic<unsigned int> nWalletDBUpdateCounter; |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -180,11 +178,6 @@ bool CWalletDB::WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccount |
|
|
|
return WriteIC(std::make_pair(std::string("acentry"), std::make_pair(acentry.strAccount, nAccEntryNum)), acentry); |
|
|
|
return WriteIC(std::make_pair(std::string("acentry"), std::make_pair(acentry.strAccount, nAccEntryNum)), acentry); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool CWalletDB::WriteAccountingEntry_Backend(const CAccountingEntry& acentry) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return WriteAccountingEntry(++nAccountingEntryNumber, acentry); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CAmount CWalletDB::GetAccountCreditDebit(const std::string& strAccount) |
|
|
|
CAmount CWalletDB::GetAccountCreditDebit(const std::string& strAccount) |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::list<CAccountingEntry> entries; |
|
|
|
std::list<CAccountingEntry> entries; |
|
|
@ -321,8 +314,9 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, |
|
|
|
ssKey >> strAccount; |
|
|
|
ssKey >> strAccount; |
|
|
|
uint64_t nNumber; |
|
|
|
uint64_t nNumber; |
|
|
|
ssKey >> nNumber; |
|
|
|
ssKey >> nNumber; |
|
|
|
if (nNumber > nAccountingEntryNumber) |
|
|
|
if (nNumber > pwallet->nAccountingEntryNumber) { |
|
|
|
nAccountingEntryNumber = nNumber; |
|
|
|
pwallet->nAccountingEntryNumber = nNumber; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!wss.fAnyUnordered) |
|
|
|
if (!wss.fAnyUnordered) |
|
|
|
{ |
|
|
|
{ |
|
|
|