aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | BDB: restore DB_PRIVATE flag to environmentJeff Garzik2012-05-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Satoshi's commits fdbf76d and c8ad9b8 (SVN import) removed the DB_PRIVATE flag from the environment. In part, this enables processes other than bitcoind to examine the active database environment. However, this incurs a slight performance penalty versus working entirely within application memory (DB_PRIVATE). Because bitcointools and other direct-BDB-accessing tools are not used by the vast majority of users, prefer to default with DB_PRIVATE with the option of disabling it if needed via -privdb=0.
* | Merge pull request #1354 from fanquake/masterPieter Wuille2012-05-201-1/+1
|\ \ | |/ |/| Update Header Licenses
| * Update License in File HeadersFordy2012-05-181-1/+1
| | | | | | | | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
* | Default to DB_TXN_WRITE_NOSYNC for all transactional operationsJeff Garzik2012-05-191-0/+1
|/ | | | | | | | | * This is safer than DB_TXN_NOSYNC, and does not appear to impact performance. * Applying this to the dbenv is necessary to avoid many fdatasync(2) calls on db 5.x * We carefully and thoroughly flush databases upon shutdown and other important events already.
* Report how long DBFlush took.R E Broadley2012-05-171-0/+2
|
* Merge pull request #1316 from jgarzik/dead-codeJeff Garzik2012-05-171-5/+0
|\ | | | | Remove dead code: CTxDB::EraseBlockIndex(), CBlockIndex::EraseBlockFromDisk()
| * Remove dead code: CTxDB::EraseBlockIndex(), CBlockIndex::EraseBlockFromDisk()Jeff Garzik2012-05-151-5/+0
| |
* | CAddrDB: Replace BDB-managed addr.dat with internally managed peers.datJeff Garzik2012-05-161-50/+79
|/
* Merge pull request #883 from sipa/loadblockGregory Maxwell2012-05-081-2/+2
|\ | | | | Add -loadblock to load from an external blk000?.dat file
| * -loadblock to load from an external blk000?.dat filePieter Wuille2012-04-221-2/+2
| |
* | Make lsn_reset ("detach databases") optional and off by default.Pieter Wuille2012-04-261-2/+7
| | | | | | | | | | | | | | | | | | | | Add an option -detachdb (and entry in OptionDialog), without which no lsn_reset is called on addr.dat and blkindex.dat. That means these files cannot be moved to a new environment, but shutdown can be significantly faster. The wallet file is always lsn_reset'ed. -detachdb corresponds to the old behaviour, though it is off by default now to speed up shutdowns.
* | Change signed->unsigned at 3 code sitesJeff Garzik2012-04-231-1/+1
|/ | | | This resolves signed/unsigned comparison warnings.
* Added ability to respond to signals during Block Loading stage.R E Broadley2012-04-181-2/+5
|
* Merge pull request #1114 from sipa/lesssyncPieter Wuille2012-04-171-0/+2
|\ | | | | Reduce sync frequency for blkindex.dat
| * Reduce sync frequency for blkindex.datPieter Wuille2012-04-171-0/+2
| | | | | | | | | | | | | | Since auto-remove-db-logs was enabled, each time a CTxDB was closed outside of the initial download window, it causes a checkpoint + log cleanup. This is overkill, so reduce the sync frequency to once per minute at most.
* | Further reduce header dependenciesPieter Wuille2012-04-171-9/+8
| | | | | | | | | | | | | | This commit removes the dependency of serialize.h on PROTOCOL_VERSION, and makes this parameter required instead of implicit. This is much saner, as it makes the places where changing a version number can have an influence obvious.
* | Move CWalletDB code to new walletdb module.Jeff Garzik2012-04-171-415/+3
| | | | | | | | | | In addition to standard code separation, this change opens the door to fixing several include inter-dependencies.
* | Remove headers.hPieter Wuille2012-04-171-2/+7
|/
* fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]Wladimir J. van der Laan2012-04-151-0/+4
|
* Use filesystem::path instead of manual string tinkeringPieter Wuille2012-04-111-14/+8
| | | | | | | | | | | | | | Where possible, use boost::filesystem::path instead of std::string or char* for filenames. This avoids a lot of manual string tinkering, in favor of path::operator/. GetDataDir is also reworked significantly, it now only keeps two cached directory names (the network-specific data dir, and the root data dir), which are decided through a parameter instead of pre-initialized global variables. Finally, remove the "upgrade from 0.1.5" case where a debug.log in the current directory has to be removed.
* Remove path.make_preferred() calls, and fix compiler error in bitcoinrpc RE: ↵Gavin Andresen2012-04-111-4/+0
| | | | boost::system
* Merge pull request #1052 from sipa/scopedlocksPieter Wuille2012-04-091-9/+14
|\ | | | | Use scoped locks instead of CRITICAL_BLOCK
| * Use scoped locks instead of CRITICAL_BLOCKPieter Wuille2012-04-091-9/+14
| |
* | updated db.cpp to use make_preferred()Philip Kaufmann2012-04-061-6/+10
|/
* Flush on log size instead of transaction countPieter Wuille2012-04-051-10/+1
|
* Merge pull request #1010 from sipa/fastblocks2Gavin Andresen2012-03-291-2/+12
|\ | | | | Use transactions-updated as flush condition
| * Use transactions-updated as flush conditionPieter Wuille2012-03-291-2/+12
| | | | | | | | | | The normal checkpointing during the block chain download is reduced to every five minutes only, but forced every 200000 updated transactions.
* | Workaround hangs when upgrading old addr.dat filesGavin Andresen2012-03-291-22/+11
|/
* Auto-remove logs, and decrease logfile size to 10MGavin Andresen2012-03-291-2/+3
|
* Use erase instead of rewrite to remove old addr entriesPieter Wuille2012-03-261-17/+11
|
* Merge branch 'checklevel' of https://github.com/sipa/bitcoinGavin Andresen2012-03-221-2/+97
|\
| * Add -checklevel and improve -checkblocksPieter Wuille2012-03-221-2/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -checkblocks now takes a numeric argument: the number of blocks that must be verified at the end of the chain. Default is 2500, and 0 means all blocks. -checklevel specifies how thorough the verification must be: 0: only check whether the block exists on disk 1: verify block validity (default) 2: verify transaction index validity 3: check transaction hashes 4: check whether spent txouts were spent within the main chain 5: check whether all prevouts are marked spent 6: check whether spent txouts were spent by a valid transaction that consumes them
* | Merge pull request #975 from sipa/versioncheckGavin Andresen2012-03-221-8/+8
|\ \ | | | | | | Check minversion before loading the rest of the wallet
| * | Check minversion before loading the rest of the walletPieter Wuille2012-03-221-8/+8
| |/ | | | | | | | | | | | | When a 0.6 wallet with compressed pubkeys is created, it writes a minversion record to prevent older clients from reading it. If the 0.5 loading it sees a key record before seeing the minversion record however, it will fail with DB_CORRUPT instead of DB_TOO_NEW.
* | Merge branch 'addrman' of https://github.com/sipa/bitcoinGavin Andresen2012-03-221-23/+48
|\ \
| * | CAddrMan: stochastic address managerPieter Wuille2012-02-241-23/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Design goals: * Only keep a limited number of addresses around, so that addr.dat does not grow without bound. * Keep the address tables in-memory, and occasionally write the table to addr.dat. * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. See comments in addrman.h for more detailed information.
* | | Speed up block downloadingPieter Wuille2012-03-211-2/+5
| |/ |/|
* | Print more diagnostic info for the various DB_CORRUPT conditionsLuke Dashjr2012-03-121-2/+36
| |
* | bitcoind changes to stop storing settings in wallet.dat.Gavin Andresen2012-02-261-47/+0
| |
* | Fix addrProxy settingPieter Wuille2012-02-251-1/+15
|/ | | | | | | | | Before 0.6 addrProxy was a CAddress, but netbase changed it to CService. Retain compatibility by wrapping/unwrapping with a CAddress when saving or loading. This commit retains compatibility with 0.6.0rc1 (which wrote the setting as a CService) by trying to parse twice.
* Add SetMinVersion to CWalletPieter Wuille2012-02-181-0/+1
|
* Added 'Backup Wallet' menu optionsje3972012-02-151-5/+11
| | | | | | | | - icon from the LGPL Nuvola set (like the tick) - http://www.icon-king.com/projects/nuvola/ - include 'boost/version.hpp' in db.cpp so that the overwrite version of copy can be used - catch exceptions in BackupWallet (e.g. filesystem_error thrown when trying to overwrite without the overwrite flag set) - include db.h in walletmodel.cpp for BackupWallet function - updated doc/assets-attribution.txt and contrib/debian/copyright with copyright info for new icon
* Update all copyrights to 2012Gavin Andresen2012-02-071-1/+1
|
* Look for flushwallet/listen/irc/dnsseed/upnp instead of noflushwallet/etc. ↵Gavin Andresen2012-02-071-1/+1
| | | | And switch default for irc to 0.
* Full checking of all loaded keysPieter Wuille2012-01-261-1/+3
|
* Check consistency of private keysPieter Wuille2012-01-251-0/+2
| | | | | Reported by onlineproof on IRC: Bitcoin does not verify whether private keys and public keys correspond, when loading a wallet.
* Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).Gavin Andresen2012-01-131-1/+1
|
* Compressed pubkeysPieter Wuille2012-01-091-0/+2
| | | | | | | | | | This patch enabled compressed pubkeys when -compressedpubkeys is passed. These are 33 bytes instead of 65, and require only marginally more CPU power when verifying. Compressed pubkeys have a different corresponding address, so it is determined at generation. When -compressedpubkeys is given, all newly generated addresses will use a compressed key, while older/other addresses keep using normal keys. Unpatched clients will relay and verify these transactions.
* Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan2011-12-211-10/+8
| | | | This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
* Use standard C99 (and Qt) types for 64-bit integersLuke Dashjr2011-12-201-8/+10
|