aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4748Pieter Wuille2014-08-261-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | ad49c25 Split up util.cpp/h (Wladimir J. van der Laan) f841aa2 Move `COIN` and `CENT` to core.h (Wladimir J. van der Laan) 6e5fd00 Move `*Version()` functions to version.h/cpp (Wladimir J. van der Laan) b4aa769 Move `S_I*` constants and `MSG_NOSIGNAL` to compat.h (Wladimir J. van der Laan) af8297c Move functions in wallet.h to implementation file (Wladimir J. van der Laan) 651480c move functions in main and net to implementation files (Wladimir J. van der Laan) 610a8c0 Move SetThreadPriority implementation to util.cpp instead of the header (Wladimir J. van der Laan) f780e65 Remove unused function `ByteReverse` from util.h (Wladimir J. van der Laan) 121d6ad Remove unused `alignup` function from util.h (Wladimir J. van der Laan) d1e26d4 Move CMedianFilter to timedata.cpp (Wladimir J. van der Laan)
| * Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
* | Make appropriate getter-routines "const" in CCoinsView.Daniel Kraft2014-08-261-5/+8
|/ | | | Mark the "Get"/"Have" routines in CCoinsView and subclasses as "const".
* Allow BatchWrite to destroy its input, reducing copyingPieter Wuille2014-08-241-2/+5
|
* Changed LevelDB cursors to use scoped pointers to ensure destruction when ↵Ross Nicoll2014-08-161-4/+2
| | | | | | | | going out of scope. This corrects a bug where an exception thrown reading from the database causes the cursor to be left open, which causes an assertion error to occur when the database is deleted (around line 938 of init.cpp).
* typedef std::map<uint256, CCoins> to CCoinsMapWladimir J. van der Laan2014-07-011-2/+2
| | | | | | | This makes it possible to switch to a more efficient map type without changing all occurences manually. Merges half of #4413.
* Refactor proof of work related functions out of mainjtimon2014-06-231-2/+3
|
* Move {Get,Set}Compact from bignum to uint256Pieter Wuille2014-05-091-6/+0
|
* use standard __func__ instead of __PRETTY_FUNCTION__Philip Kaufmann2014-04-301-2/+2
|
* Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron2014-02-091-1/+1
| | | | | | in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
* Remove redundant .c_str()sWladimir J. van der Laan2014-01-231-1/+1
| | | | | | | After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
* extend std::exception logging in txdb.cppPhilip Kaufmann2013-12-201-6/+6
|
* Make CCoinsView use block hashes instead of indicesPieter Wuille2013-11-101-13/+10
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-4/+6
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Rename leveldb.{h,cpp} to leveldbwrapper.{h,cpp}.Brandon Dahler2013-11-081-1/+1
|
* Do not use the redundant BestInvalidWork record in the block database.Pieter Wuille2013-11-011-5/+1
| | | | | | As block index entries have a flag for marking invalid blocks, the 'best invalid work' information can be derived from there. In addition, remove the global from main.h
* Merge pull request #3119Pieter Wuille2013-10-201-1/+1
|\ | | | | | | db0e8cc Bump Year Number to 2013 (super3)
| * Bump Year Number to 2013super32013-10-201-1/+1
| |
* | Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-4/+0
|/
* Replace printf with LogPrintf / LogPrintGavin Andresen2013-09-181-1/+1
|
* Introduce a CChainParameters singleton class and regtest mode.Mike Hearn2013-06-191-1/+2
| | | | | | | | | | | | | The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
* Improve gettxoutsetinfo commandPieter Wuille2013-05-011-3/+19
| | | | | | | | | * Bugfix: output the correct best block hash (during IBD, it can differ from the actual current best block) * Add height to output * Add hash_serialized, which is a hash of the entire UTXO state. Can be useful to compare two nodes. * Add total_amount, the sum of all UTXOs' values.
* Clean up shutdown processGavin Andresen2013-04-031-2/+4
|
* Merge pull request #2221 from sipa/perfoGavin Andresen2013-02-221-3/+3
|\ | | | | Various performance tweaks to CCoinsView
| * Various performance tweaks to CCoinsViewPieter Wuille2013-01-261-3/+3
| | | | | | | | | | | | | | | | * Pass txid's to CCoinsView functions by reference instead of by value * Add a method to swap CCoins, and use it in some places to avoid a allocating copy + destruct. * Optimize CCoinsViewCache::FetchCoins to do only a single search through the backing map.
* | Rename database directoriesPieter Wuille2013-01-281-2/+2
|/
* Add optional transaction index to databasesPieter Wuille2013-01-181-0/+23
| | | | | | | | | By specifying -txindex when initializing the database, a txid-to-diskpos index is maintained in the blktree database. This database is used to help answering getrawtransaction() RPC queries, when enabled. Changing the -txindex value requires a -reindex; the client will abort at startup if the database and the specified -txindex mismatch.
* Add -reindex, to perform in-place reindexing of block chain filesPieter Wuille2012-11-091-2/+14
| | | | | | | 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.
* Cache size optimizationsPieter Wuille2012-11-041-2/+2
|
* Bugfix: don't crash by trying to write unchanged best blockPieter Wuille2012-10-281-1/+2
|
* Remove BDB block database supportPieter Wuille2012-10-201-0/+189