diff options
-rw-r--r-- | bitcoin-qt.pro | 2 | ||||
-rw-r--r-- | doc/files.txt | 19 | ||||
-rw-r--r-- | src/makefile.unix | 2 | ||||
-rw-r--r-- | src/qt/clientmodel.cpp | 5 | ||||
-rw-r--r-- | src/wallet.cpp | 2 |
5 files changed, 27 insertions, 3 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 6c1c4a78cc..8a6f9efebd 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -372,6 +372,8 @@ win32:!contains(MINGW_THREAD_BUGFIX, 0) { !win32:!macx { DEFINES += LINUX LIBS += -lrt + # _FILE_OFFSET_BITS=64 lets 32-bit fopen transparently support large files. + DEFINES += _FILE_OFFSET_BITS=64 } macx:HEADERS += src/qt/macdockiconhandler.h diff --git a/doc/files.txt b/doc/files.txt new file mode 100644 index 0000000000..5d4cdabf8d --- /dev/null +++ b/doc/files.txt @@ -0,0 +1,19 @@ +Used in 0.8.0: +* wallet.dat: personal wallet (BDB) with keys and transactions +* peers.dat: peer IP address database (custom format); since 0.7.0 +* blocks/blk000??.dat: block data (custom, 128 MiB per file); since 0.8.0 +* blocks/rev000??.dat; block undo data (custom); since 0.8.0 (format changed since pre-0.8) +* blocks/index/*; block index (LevelDB); since 0.8.0 +* chainstate/*; block chain state database (LevelDB); since 0.8.0 +* database/*: BDB database environment; only used for wallet since 0.8.0 + +Only used in pre-0.8.0: +* blktree/*; block chain index (LevelDB); since pre-0.8, replaced by blocks/index/* in 0.8.0 +* coins/*; unspent transaction output database (LevelDB); since pre-0.8, replaced by chainstate/* in 0.8.0 + +Only used before 0.8.0: +* blkindex.dat: block chain index database (BDB); replaced by {chainstate/*,blocks/index/*,blocks/rev000??.dat} in 0.8.0 +* blk000?.dat: block data (custom, 2 GiB per file); replaced by blocks/blk000??.dat in 0.8.0 + +Only used before 0.7.0: +* addr.dat: peer IP address database (BDB); replaced by peers.dat in 0.7.0 diff --git a/src/makefile.unix b/src/makefile.unix index 14cf1b8fa5..b52a0f8aea 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -7,7 +7,7 @@ USE_IPV6:=1 LINK:=$(CXX) -DEFS=-DBOOST_SPIRIT_THREADSAFE +DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 12bd989338..084ad12a56 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -48,7 +48,10 @@ int ClientModel::getNumBlocksAtStartup() QDateTime ClientModel::getLastBlockDate() const { - return QDateTime::fromTime_t(pindexBest->GetBlockTime()); + if (pindexBest) + return QDateTime::fromTime_t(pindexBest->GetBlockTime()); + else + return QDateTime::fromTime_t(1231006505); // Genesis block's time } void ClientModel::updateTimer() diff --git a/src/wallet.cpp b/src/wallet.cpp index 557784e5c2..b8ef2a20bf 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1190,7 +1190,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW scriptChange.SetDestination(vchPubKey.GetID()); // Insert change txn at random position: - vector<CTxOut>::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size()); + vector<CTxOut>::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size()+1); wtxNew.vout.insert(position, CTxOut(nChange, scriptChange)); } else |