aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
AgeCommit message (Collapse)Author
2012-05-19Default to DB_TXN_WRITE_NOSYNC for all transactional operationsJeff Garzik
* 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.
2012-05-18Update License in File HeadersFordy
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.
2012-05-17Report how long DBFlush took.R E Broadley
2012-05-17Merge pull request #1316 from jgarzik/dead-codeJeff Garzik
Remove dead code: CTxDB::EraseBlockIndex(), CBlockIndex::EraseBlockFromDisk()
2012-05-16CAddrDB: Replace BDB-managed addr.dat with internally managed peers.datJeff Garzik
2012-05-15Remove dead code: CTxDB::EraseBlockIndex(), CBlockIndex::EraseBlockFromDisk()Jeff Garzik
2012-05-08Merge pull request #883 from sipa/loadblockGregory Maxwell
Add -loadblock to load from an external blk000?.dat file
2012-04-26Make lsn_reset ("detach databases") optional and off by default.Pieter Wuille
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.
2012-04-23Change signed->unsigned at 3 code sitesJeff Garzik
This resolves signed/unsigned comparison warnings.
2012-04-22-loadblock to load from an external blk000?.dat filePieter Wuille
2012-04-18Added ability to respond to signals during Block Loading stage.R E Broadley
2012-04-17Merge pull request #1114 from sipa/lesssyncPieter Wuille
Reduce sync frequency for blkindex.dat
2012-04-17Further reduce header dependenciesPieter Wuille
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.
2012-04-17Move CWalletDB code to new walletdb module.Jeff Garzik
In addition to standard code separation, this change opens the door to fixing several include inter-dependencies.
2012-04-17Remove headers.hPieter Wuille
2012-04-17Reduce sync frequency for blkindex.datPieter Wuille
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.
2012-04-15fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]Wladimir J. van der Laan
2012-04-11Use filesystem::path instead of manual string tinkeringPieter Wuille
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.
2012-04-11Remove path.make_preferred() calls, and fix compiler error in bitcoinrpc RE: ↵Gavin Andresen
boost::system
2012-04-09Merge pull request #1052 from sipa/scopedlocksPieter Wuille
Use scoped locks instead of CRITICAL_BLOCK
2012-04-09Use scoped locks instead of CRITICAL_BLOCKPieter Wuille
2012-04-06updated db.cpp to use make_preferred()Philip Kaufmann
2012-04-05Flush on log size instead of transaction countPieter Wuille
2012-03-29Merge pull request #1010 from sipa/fastblocks2Gavin Andresen
Use transactions-updated as flush condition
2012-03-29Use transactions-updated as flush conditionPieter Wuille
The normal checkpointing during the block chain download is reduced to every five minutes only, but forced every 200000 updated transactions.
2012-03-29Workaround hangs when upgrading old addr.dat filesGavin Andresen
2012-03-29Auto-remove logs, and decrease logfile size to 10MGavin Andresen
2012-03-26Use erase instead of rewrite to remove old addr entriesPieter Wuille
2012-03-22Merge branch 'checklevel' of https://github.com/sipa/bitcoinGavin Andresen
2012-03-22Merge pull request #975 from sipa/versioncheckGavin Andresen
Check minversion before loading the rest of the wallet
2012-03-22Merge branch 'addrman' of https://github.com/sipa/bitcoinGavin Andresen
2012-03-22Check minversion before loading the rest of the walletPieter Wuille
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.
2012-03-22Add -checklevel and improve -checkblocksPieter Wuille
-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
2012-03-21Speed up block downloadingPieter Wuille
2012-03-12Print more diagnostic info for the various DB_CORRUPT conditionsLuke Dashjr
2012-02-26bitcoind changes to stop storing settings in wallet.dat.Gavin Andresen
2012-02-25Fix addrProxy settingPieter Wuille
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.
2012-02-24CAddrMan: stochastic address managerPieter Wuille
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.
2012-02-18Add SetMinVersion to CWalletPieter Wuille
2012-02-15Added 'Backup Wallet' menu optionsje397
- 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
2012-02-07Update all copyrights to 2012Gavin Andresen
2012-02-07Look for flushwallet/listen/irc/dnsseed/upnp instead of noflushwallet/etc. ↵Gavin Andresen
And switch default for irc to 0.
2012-01-26Full checking of all loaded keysPieter Wuille
2012-01-25Check consistency of private keysPieter Wuille
Reported by onlineproof on IRC: Bitcoin does not verify whether private keys and public keys correspond, when loading a wallet.
2012-01-13Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).Gavin Andresen
2012-01-09Compressed pubkeysPieter Wuille
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.
2011-12-21Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan
This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
2011-12-20Use standard C99 (and Qt) types for 64-bit integersLuke Dashjr
2011-12-19Use block times for 'hard' OP_EVAL switchover, and refactored EvalScriptGavin Andresen
so it takes a flag for how to interpret OP_EVAL. Also increased IsStandard size of scriptSigs to 500 bytes, so a 3-of-3 multisig transaction IsStandard.
2011-12-19OP_EVAL implementationGavin Andresen
OP_EVAL is a new opcode that evaluates an item on the stack as a script. It enables a new type of bitcoin address that needs an arbitrarily complex script to redeem.