aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-09-08 04:55:36 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-09-08 04:55:36 +0000
commitda7b8c1260d91e3306eb18dd65633567cb31332f (patch)
tree1fad88d0c8f5bb0953887c268e9a5a55910931d8 /src/wallet.h
parentddb709e9de1490afcfa1af045517d2228d5b864c (diff)
Bugfix: Initialize CWallet::nOrderPosNext on an empty wallet, and save it in db
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet.h b/src/wallet.h
index 65d3448212..d3e9fd4ba4 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -98,6 +98,7 @@ public:
fFileBacked = false;
nMasterKeyMaxID = 0;
pwalletdbEncryption = NULL;
+ nOrderPosNext = 0;
}
CWallet(std::string strWalletFileIn)
{
@@ -107,6 +108,7 @@ public:
fFileBacked = true;
nMasterKeyMaxID = 0;
pwalletdbEncryption = NULL;
+ nOrderPosNext = 0;
}
std::map<uint256, CWalletTx> mapWallet;
@@ -144,6 +146,11 @@ public:
bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase);
bool EncryptWallet(const SecureString& strWalletPassphrase);
+ /** Increment the next transaction order id
+ @return next transaction order id
+ */
+ int64 IncOrderPosNext();
+
typedef std::pair<CWalletTx*, CAccountingEntry*> TxPair;
typedef std::multimap<int64, TxPair > TxItems;