aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | update CClientUIInterface and remove orphan Wx stuffPhilip Kaufmann2012-11-261-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - fix ThreadSafeMessageBox always displays error icon - allow to specify MSG_ERROR / MSG_WARNING or MSG_INFORMATION without a custom caption / title - allow to specify CClientUIInterface::ICON_ERROR / ICON_WARNING and ICON_INFORMATION (which is default) as message box icon - remove CClientUIInterface::OK from ThreadSafeMessageBox-calls, as the OK button will be set as default, if none is specified - prepend "Bitcoin - " to used captions - rename BitcoinGUI::error() -> BitcoinGUI::message() and add function documentation - change all style parameters and enum flags to unsigned - update code to use that new API - update Client- and WalletModel to use new BitcoinGUI::message() and rename the classes error() method into message() - include the possibility to supply the wanted icon for messages from Client- and WalletModel via "style" parameter
* | make enum and parameter used in Bind() unsignedPhilip Kaufmann2012-11-141-4/+4
| | | | | | | | | | - it's good practise to use unsigned int for enum flags, so change this one, as I introduced this for Bind()
* | allow listening on -bind=address for blocked networksPhilip Kaufmann2012-11-101-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - this allows the client to listen on via -bind specified addresses (e.g. 127.0.0.1), even when a network (IPv4 in that case) was blocked via e.g -onlynet="Tor" - introduce enum BindFlags to avoid passing multiple bools to Bind() - make -bind help text clear we ALWAYS listen on the specified address - remove an unused variable - remove 2 unneeded IsLimited() checks before calling Bind(), which does these checks anyway - usage case: specify -bind=127.0.0.1 -onlynet="Tor" to allow incoming connections to a Tor hidden service, but still don't allow other IPv4 nodes to connect / get connected
* | Merge pull request #1943 from sipa/reindex2Pieter Wuille2012-11-091-5/+87
|\ \ | | | | | | Add -reindex, to perform in-place reindexing of block chain files
| * | Add -reindex, to perform in-place reindexing of block chain filesPieter Wuille2012-11-091-14/+52
| | | | | | | | | | | | | | | | | | | | | Flushes the blktree/ and coins/ databases, and reindexes the block chain files, as if their contents was loaded via -loadblock. Based on earlier work by Jeff Garzik.
| * | Move ThreadImport to init.cppPieter Wuille2012-11-091-0/+44
| | |
* | | Merge pull request #1978 from sipa/nodetachPieter Wuille2012-11-091-3/+0
|\ \ \ | |/ / |/| | Remove -detachdb and stop's detach argument.
| * | Remove -detachdb and stop's detach argument.Pieter Wuille2012-11-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | As the only BDB database left is the wallet, and it is always detached. Also remove IsChainFile() predicate and related chainfile-specific logic.
* | | Merge pull request #1981 from sipa/cachesPieter Wuille2012-11-081-3/+14
|\ \ \ | | | | | | | | Cache size optimizations
| * | | Cache size optimizationsPieter Wuille2012-11-041-3/+14
| |/ /
* / / fix some double-spaces in stringsPhilip Kaufmann2012-10-251-1/+1
|/ / | | | | | | | | - remove some unneeded stuff in sendcoinsentry.ui - harmonize some "Error:"-messages
* | First flush block tree, then coin setPieter Wuille2012-10-251-2/+2
| | | | | | | | | | | | As the coinset data refers to the best block, stored in the block tree. Flushing the coin set first can cause inconsistencies if the process gets killed in between.
* | Added checks for null pointers in Shutdowntucenaber2012-10-251-2/+4
| | | | | | | | Estetics
* | change blockchain -> block chain (spelling)Philip Kaufmann2012-10-211-1/+1
| | | | | | | | | | - Wiki says "block chain" is correct ;) - remove some unneeded spaces I found in the source, while fixing the spelling
* | Add LevelDB MemEnv supportPieter Wuille2012-10-201-1/+1
| | | | | | | | Support LevelDB memory-backed environments, and use them in unit tests.
* | LevelDB block and coin databasesPieter Wuille2012-10-201-1/+1
| | | | | | | | | | | | | | | | Split off CBlockTreeDB and CCoinsViewDB into txdb-*.{cpp,h} files, implemented by either LevelDB or BDB. Based on code from earlier commits by Mike Hearn in his leveldb branch.
* | Use singleton block tree database instancePieter Wuille2012-10-201-0/+3
| |
* | Prepare database format for multi-stage block processingPieter Wuille2012-10-201-32/+3
| | | | | | | | | | This commit adds a status field and a transaction counter to the block indexes.
* | Automatically reorganize at startup to best known blockPieter Wuille2012-10-201-0/+34
| | | | | | | | | | | | | | | | | | | | | | Given that the block tree database (chain.dat) and the active chain database (coins.dat) are entirely separate now, it becomes legal to swap one with another instance without affecting the other. This commit introduces a check in the startup code that detects the presence of a better chain in chain.dat that has not been activated yet, and does so efficiently (in batch, while reusing the blk???.dat files).
* | Batch block connection during IBDPieter Wuille2012-10-201-0/+12
| | | | | | | | | | | | | | During the initial block download (or -loadblock), delay connection of new blocks a bit, and perform them in a single action. This reduces the load on the database engine, as subsequent blocks often update an earlier block's transaction already.
* | UltraprunePieter Wuille2012-10-201-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches bitcoin's transaction/block verification logic to use a "coin database", which contains all unredeemed transaction output scripts, amounts and heights. The name ultraprune comes from the fact that instead of a full transaction index, we only (need to) keep an index with unspent outputs. For now, the blocks themselves are kept as usual, although they are only necessary for serving, rescanning and reorganizing. The basic datastructures are CCoins (representing the coins of a single transaction), and CCoinsView (representing a state of the coins database). There are several implementations for CCoinsView. A dummy, one backed by the coins database (coins.dat), one backed by the memory pool, and one that adds a cache on top of it. FetchInputs, ConnectInputs, ConnectBlock, DisconnectBlock, ... now operate on a generic CCoinsView. The block switching logic now builds a single cached CCoinsView with changes to be committed to the database before any changes are made. This means no uncommitted changes are ever read from the database, and should ease the transition to another database layer which does not support transactions (but does support atomic writes), like LevelDB. For the getrawtransaction() RPC call, access to a txid-to-disk index would be preferable. As this index is not necessary or even useful for any other part of the implementation, it is not provided. Instead, getrawtransaction() uses the coin database to find the block height, and then scans that block to find the requested transaction. This is slow, but should suffice for debug purposes.
* | Move external block import to separate threadPieter Wuille2012-10-201-19/+3
| |
* | Fix a use-after-free problem in initialization (#1920)Wladimir J. van der Laan2012-10-121-6/+6
| | | | | | | | | | | | | | Don't store the result of c_str(). Luckily, this only affects logging, though it could crash or leak sensitive data to the log in rare cases.
* | Fix bad merge, pszDataDir duplicationGavin Andresen2012-10-091-1/+0
| |
* | Merge branch 'wallet_exceptions' of github.com:gavinandresen/bitcoin-gitGavin Andresen2012-10-091-9/+56
|\ \
| * | Don't try to verify a non-existent wallet.datGavin Andresen2012-10-081-10/+13
| | |
| * | Handle corrupt wallets gracefully.Gavin Andresen2012-10-081-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrupt wallets used to cause a DB_RUNRECOVERY uncaught exception and a crash. This commit does three things: 1) Runs a BDB verify early in the startup process, and if there is a low-level problem with the database: + Moves the bad wallet.dat to wallet.timestamp.bak + Runs a 'salvage' operation to get key/value pairs, and writes them to a new wallet.dat + Continues with startup. 2) Much more tolerant of serialization errors. All errors in deserialization are reported by tolerated EXCEPT for errors related to reading keypairs or master key records-- those are reported and then shut down, so the user can get help (or recover from a backup). 3) Adds a new -salvagewallet option, which: + Moves the wallet.dat to wallet.timestamp.bak + extracts ONLY keypairs and master keys into a new wallet.dat + soft-sets -rescan, to recreate transaction history This was tested by randomly corrupting testnet wallets using a little python script I wrote (https://gist.github.com/3812689)
| * | Handle incompatible BDB environmentsGavin Andresen2012-10-081-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, opening a -datadir that was created with a new version of Berkeley DB would result in an un-caught DB_RUNRECOVERY exception. After these changes, the error is caught and the user is told that there is a problem and is told how to try to recover from it.
* | | Revert "Send 'mempool' P2P command at the start of each P2P session"Jeff Garzik2012-10-081-4/+1
| | | | | | | | | | | | | | | | | | Fat-fingered on github, and merged this too early. This reverts commit 22f9b069035c9ba0416a62714db167eea5ba762f.
* | | Merge pull request #1833 from jgarzik/mempool-queryJeff Garzik2012-10-081-1/+4
|\ \ \ | | | | | | | | Send 'mempool' P2P command at the start of each P2P session
| * | | Send 'mempool' P2P command at the start of each P2P sessionJeff Garzik2012-09-241-1/+4
| | |/ | |/| | | | | | | to query remote node mempool contents.
* | | Merge branch 'BDB_DOWNGRADE'Gavin Andresen2012-10-081-3/+12
|\ \ \ | |_|/ |/| |
| * | Handle incompatible BDB environmentsGavin Andresen2012-10-081-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, opening a -datadir that was created with a new version of Berkeley DB would result in an un-caught DB_RUNRECOVERY exception. After these changes, the error is caught and the user is told that there is a problem and is told how to try to recover from it.
* | | Send --help message to stdout i.s.o stderrWladimir J. van der Laan2012-10-041-1/+1
|/ / | | | | | | | | | | | | | | This allows fun stuff such as `bitcoin --help | less`, and more easy piping to files. Looking at other tools such as bash, gcc, they all send their help text to stdout.
* | fix -Wformat warnings all over the sourcePhilip Kaufmann2012-10-011-4/+4
| |
* | Merge pull request #1862 from kjj2/testportsPieter Wuille2012-09-281-1/+1
|\ \ | | | | | | Fix: when testnet=1 specified, change default RPC port to 18332
| * | Fix: when testnet=1 specified, change default ports to 18332 and 18333kjj22012-09-241-1/+1
| |/
* / Import $DataDir/bootstrap.dat automatically, if it exists.Jeff Garzik2012-09-241-1/+14
|/ | | | | As discussed on IRC. Intended to make using an external blockchain download solution just a bit easier.
* Fix double-paren typoGavin Andresen2012-09-061-1/+1
|
* remove double logging of startup time, when !fLogTimestampsPhilip Kaufmann2012-09-051-1/+0
|
* init.cpp: fix build error, and possibly-uninit'd warningJeff Garzik2012-09-041-2/+2
|
* Merge pull request #1427 from rebroad/StartTimeFixJeff Garzik2012-09-041-0/+2
|\ | | | | No need to log start time if it's already being done on every line.
| * No need to log start time if it's already being done on every line.R E Broadley2012-09-011-0/+2
| |
* | Merge pull request #1738 from laanwj/2012_08_boostthreadJeff Garzik2012-09-041-4/+4
|\ \ | | | | | | implement CreateThread with boost::thread
| * | Rename CreateThread to NewThreadWladimir J. van der Laan2012-08-291-4/+4
| |/ | | | | | | Prevent clash with win32 API symbol
* / add default value in -timeout descriptionPhilip Kaufmann2012-08-301-1/+1
|/
* Allow building with IPv6 support, but it disabled by defaultLuke Dashjr2012-08-231-0/+6
|
* Fix infinite loops in connection logicPieter Wuille2012-08-221-1/+1
|
* add splashscreen message when importing blocks via -loadblockPhilip Kaufmann2012-08-171-0/+1
|
* Bitcoin-Qt (Windows only): enable DEP for bitcoin-qt.exePhilip Kaufmann2012-08-031-2/+14
| | | | | | | | - this enables DEP on all Windows version which support the SetProcessDEPPolicy() call in Kernel32.dll - use a dynamic approach via GetProcAddress() to not rely on headers or compiler libs - this is the same way the Tor-project does it