aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.h
Commit message (Collapse)AuthorAgeFilesLines
* Make threshold for flushing more conservative.Alex Morcos2017-04-051-2/+4
| | | | | | | Always leave a reasonable buffer of 50MB for usage from newly connected block (once over 50%) and increase the high water mark buffer to 200MB. Github-Pull: #10133 Rebased-From: 1b55e07b7a61a9e6c299cf4c40fde80fa715d440
* Lower default memory footprint slightlyAlex Morcos2017-04-051-1/+1
| | | | | Github-Pull: #10133 Rebased-From: f33afd3b2be1bcabeb10168a53835359c9ff4a3e
* Make pcoinsTip memory calculations consistentAlex Morcos2017-04-051-1/+5
| | | | | | | | Since we are more accurately measuring pcoinsTip peak usage at twice the current in dynamic usage, it makes sense to double the default (this will lead to the same effective usage and peak usage as previously). We should also double the buffer used to avoid flushing if above 90% but still sufficient space remaining. Github-Pull: #10133 Rebased-From: 5b95a190e8d7059039ce61e808d494dcf89ebb3b
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Get rid of nType and nVersionPieter Wuille2016-11-071-1/+1
| | | | | | | | | | | Remove the nType and nVersion as parameters to all serialization methods and functions. There is only one place where it's read and has an impact (in CAddress), and even there it does not impact any of the recursively invoked serializers. Instead, the few places that need nType or nVersion are changed to read it directly from the stream object, through GetType() and GetVersion() methods which are added to all stream classes.
* C++11: s/boost::scoped_ptr/std::unique_ptr/Jorge Timón2016-09-011-1/+1
|
* Bump `-dbcache` default to 300MiBWladimir J. van der Laan2016-07-061-3/+11
| | | | | | | Also cap the allocation for the leveldb-specific cache for the UTXO set to 8MiB. This avoids that the extra cache memory goes to the much less effective leveldb cache instead of our application-level cache.
* Break circular dependency main ↔ txdbWladimir J. van der Laan2016-04-151-4/+29
| | | | | | | | | | | | | Break the circular dependency between main and txdb by: - Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes sense, as the other block-file stuff is there too. - Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems specific to txdb. - Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves it up to the caller how to insert block indices.
* txdb: Add Cursor() method to CCoinsView to iterate over UTXO setWladimir J. van der Laan2016-04-151-1/+25
| | | | | | | | | | Add a method Cursor() to CCoinsView that returns a cursor which can be used to iterate over the whole UTXO set. - rpc: Change gettxoutsetinfo to use new Cursor method - txdb: Remove GetStats method - Now that GetStats is implemented in terms of Cursor, remove it.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* leveldbwrapper file rename to dbwrapper.*Jeff Garzik2015-10-221-1/+1
|
* leveldbwrapper symbol rename: Remove "Level" from class, etc. namesJeff Garzik2015-10-221-3/+3
|
* Cache tweak and logging improvementsPieter Wuille2015-05-111-1/+1
|
* Fix clang compile warnings intriduced in #5681Michael Ford2015-03-291-1/+1
|
* Includes: Do not include main.h from any other headerJorge Timón2015-03-241-2/+4
|
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Do all block index writes in a batchPieter Wuille2014-11-251-3/+1
|
* Convert remaining comments in /src to doxygen formatMichael Ford2014-11-211-5/+5
| | | | | | | | | | - Update comments in checkpoints to be doxygen compatible - Update comments in checkqueue to be doxygen compatible - Update coins to be doxygen compatible - Fix comment typo in crypter.h - Update licenses/copyright dates Closes #5325 #5184 #5183 #5182
* Fix all header definesPavel Janík2014-11-031-3/+3
|
* Get rid of CCoinsView's SetCoins and SetBestBlock.Pieter Wuille2014-09-231-2/+0
| | | | | | All direct modifications are now done through ModifyCoins, and BatchWrite is used for pushing batches of queued modifications up, so we don't need the low-level SetCoins and SetBestBlock anymore in the top-level CCoinsView class.
* Make appropriate getter-routines "const" in CCoinsView.Daniel Kraft2014-08-261-4/+4
| | | | Mark the "Get"/"Have" routines in CCoinsView and subclasses as "const".
* Allow BatchWrite to destroy its input, reducing copyingPieter Wuille2014-08-241-1/+1
|
* typedef std::map<uint256, CCoins> to CCoinsMapWladimir J. van der Laan2014-07-011-1/+1
| | | | | | | This makes it possible to switch to a more efficient map type without changing all occurences manually. Merges half of #4413.
* Move {Get,Set}Compact from bignum to uint256Pieter Wuille2014-05-091-2/+0
|
* Change new constants in txdb.h to int64_tWladimir J. van der Laan2014-02-181-3/+3
| | | | | A shift overflow was happening when using these to check against in init.cpp. Fixes #3702.
* add constants for shared (GUI/core) -dbcache settingsPhilip Kaufmann2014-02-171-0/+7
| | | | - adds nDefaultDbCache, nMaxDbCache and nMinDbCache in txdb.h
* Make CCoinsView use block hashes instead of indicesPieter Wuille2013-11-101-3/+3
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-1/+11
| | | | | | | | | 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-3/+3
|
* Do not use the redundant BestInvalidWork record in the block database.Pieter Wuille2013-11-011-1/+0
| | | | | | 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
* Bump Year Number to 2013super32013-10-201-1/+1
|
* 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/+4
| | | | | | | | | 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/+4
| | | | | | | 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
|
* Remove BDB block database supportPieter Wuille2012-10-201-8/+41
|
* LevelDB block and coin databasesPieter Wuille2012-10-201-0/+14
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.