@@ -121,8 +121,8 @@ bool WalletBatch::WriteBestBlock(const CBlockLocator& locator)
121
121
122
122
bool WalletBatch::ReadBestBlock (CBlockLocator& locator)
123
123
{
124
- if (batch .Read (std::string (" bestblock" ), locator) && !locator.vHave .empty ()) return true ;
125
- return batch .Read (std::string (" bestblock_nomerkle" ), locator);
124
+ if (m_batch .Read (std::string (" bestblock" ), locator) && !locator.vHave .empty ()) return true ;
125
+ return m_batch .Read (std::string (" bestblock_nomerkle" ), locator);
126
126
}
127
127
128
128
bool WalletBatch::WriteOrderPosNext (int64_t nOrderPosNext)
@@ -132,7 +132,7 @@ bool WalletBatch::WriteOrderPosNext(int64_t nOrderPosNext)
132
132
133
133
bool WalletBatch::ReadPool (int64_t nPool, CKeyPool& keypool)
134
134
{
135
- return batch .Read (std::make_pair (std::string (" pool" ), nPool), keypool);
135
+ return m_batch .Read (std::make_pair (std::string (" pool" ), nPool), keypool);
136
136
}
137
137
138
138
bool WalletBatch::WritePool (int64_t nPool, const CKeyPool& keypool)
@@ -153,7 +153,7 @@ bool WalletBatch::WriteMinVersion(int nVersion)
153
153
bool WalletBatch::ReadAccount (const std::string& strAccount, CAccount& account)
154
154
{
155
155
account.SetNull ();
156
- return batch .Read (std::make_pair (std::string (" acc" ), strAccount), account);
156
+ return m_batch .Read (std::make_pair (std::string (" acc" ), strAccount), account);
157
157
}
158
158
159
159
bool WalletBatch::WriteAccount (const std::string& strAccount, const CAccount& account)
@@ -182,7 +182,7 @@ void WalletBatch::ListAccountCreditDebit(const std::string& strAccount, std::lis
182
182
{
183
183
bool fAllAccounts = (strAccount == " *" );
184
184
185
- Dbc* pcursor = batch .GetCursor ();
185
+ Dbc* pcursor = m_batch .GetCursor ();
186
186
if (!pcursor)
187
187
throw std::runtime_error (std::string (__func__) + " : cannot create DB cursor" );
188
188
bool setRange = true ;
@@ -193,7 +193,7 @@ void WalletBatch::ListAccountCreditDebit(const std::string& strAccount, std::lis
193
193
if (setRange)
194
194
ssKey << std::make_pair (std::string (" acentry" ), std::make_pair ((fAllAccounts ? std::string (" " ) : strAccount), uint64_t (0 )));
195
195
CDataStream ssValue (SER_DISK, CLIENT_VERSION);
196
- int ret = batch .ReadAtCursor (pcursor, ssKey, ssValue, setRange);
196
+ int ret = m_batch .ReadAtCursor (pcursor, ssKey, ssValue, setRange);
197
197
setRange = false ;
198
198
if (ret == DB_NOTFOUND)
199
199
break ;
@@ -527,15 +527,15 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
527
527
LOCK (pwallet->cs_wallet );
528
528
try {
529
529
int nMinVersion = 0 ;
530
- if (batch .Read ((std::string)" minversion" , nMinVersion))
530
+ if (m_batch .Read ((std::string)" minversion" , nMinVersion))
531
531
{
532
532
if (nMinVersion > CLIENT_VERSION)
533
533
return DBErrors::TOO_NEW;
534
534
pwallet->LoadMinVersion (nMinVersion);
535
535
}
536
536
537
537
// Get cursor
538
- Dbc* pcursor = batch .GetCursor ();
538
+ Dbc* pcursor = m_batch .GetCursor ();
539
539
if (!pcursor)
540
540
{
541
541
LogPrintf (" Error getting wallet database cursor\n " );
@@ -547,7 +547,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
547
547
// Read next record
548
548
CDataStream ssKey (SER_DISK, CLIENT_VERSION);
549
549
CDataStream ssValue (SER_DISK, CLIENT_VERSION);
550
- int ret = batch .ReadAtCursor (pcursor, ssKey, ssValue);
550
+ int ret = m_batch .ReadAtCursor (pcursor, ssKey, ssValue);
551
551
if (ret == DB_NOTFOUND)
552
552
break ;
553
553
else if (ret != 0 )
@@ -630,14 +630,14 @@ DBErrors WalletBatch::FindWalletTx(std::vector<uint256>& vTxHash, std::vector<CW
630
630
631
631
try {
632
632
int nMinVersion = 0 ;
633
- if (batch .Read ((std::string)" minversion" , nMinVersion))
633
+ if (m_batch .Read ((std::string)" minversion" , nMinVersion))
634
634
{
635
635
if (nMinVersion > CLIENT_VERSION)
636
636
return DBErrors::TOO_NEW;
637
637
}
638
638
639
639
// Get cursor
640
- Dbc* pcursor = batch .GetCursor ();
640
+ Dbc* pcursor = m_batch .GetCursor ();
641
641
if (!pcursor)
642
642
{
643
643
LogPrintf (" Error getting wallet database cursor\n " );
@@ -649,7 +649,7 @@ DBErrors WalletBatch::FindWalletTx(std::vector<uint256>& vTxHash, std::vector<CW
649
649
// Read next record
650
650
CDataStream ssKey (SER_DISK, CLIENT_VERSION);
651
651
CDataStream ssValue (SER_DISK, CLIENT_VERSION);
652
- int ret = batch .ReadAtCursor (pcursor, ssKey, ssValue);
652
+ int ret = m_batch .ReadAtCursor (pcursor, ssKey, ssValue);
653
653
if (ret == DB_NOTFOUND)
654
654
break ;
655
655
else if (ret != 0 )
@@ -834,25 +834,25 @@ bool WalletBatch::WriteHDChain(const CHDChain& chain)
834
834
835
835
bool WalletBatch::TxnBegin ()
836
836
{
837
- return batch .TxnBegin ();
837
+ return m_batch .TxnBegin ();
838
838
}
839
839
840
840
bool WalletBatch::TxnCommit ()
841
841
{
842
- return batch .TxnCommit ();
842
+ return m_batch .TxnCommit ();
843
843
}
844
844
845
845
bool WalletBatch::TxnAbort ()
846
846
{
847
- return batch .TxnAbort ();
847
+ return m_batch .TxnAbort ();
848
848
}
849
849
850
850
bool WalletBatch::ReadVersion (int & nVersion)
851
851
{
852
- return batch .ReadVersion (nVersion);
852
+ return m_batch .ReadVersion (nVersion);
853
853
}
854
854
855
855
bool WalletBatch::WriteVersion (int nVersion)
856
856
{
857
- return batch .WriteVersion (nVersion);
857
+ return m_batch .WriteVersion (nVersion);
858
858
}
0 commit comments