aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Add IsNull() to class CAutoFile and remove operator !Ruben Dario Ponticeli2014-10-201-4/+4
| | |
* | | Rename CWalletInterface to CValidationInterfacePieter Wuille2014-10-201-15/+15
|/ / | | | | | | It's useful for much more than wallets.
* | Fix large reorgsPieter Wuille2014-10-141-5/+6
| |
* | Fix rebuild-chainstate feature and improve its performancePieter Wuille2014-10-141-3/+14
| | | | | | | | | | | | | | | | | | | | Previous refactorings broke the ability to rebuild the chainstate by deleting the chainstate directory, resulting in an incorrect "Incorrect or no genesis block found" error message. Fix that. Also, improve the performance of ActivateBestBlockStep by using the skiplist to only discover a few potential blocks to connect at a time, instead of all blocks forever - as we likely bail out after connecting a single one anyway.
* | Skip reindexed blocks individuallyPieter Wuille2014-10-141-33/+16
| | | | | | | | | | | | Instead of skipping to the last reindexed block in each file (which could jump over processed out-of-order blocks), just skip each already processed block individually.
* | Make -reindex cope with out-of-order blocksWladimir J. van der Laan2014-10-141-8/+54
| | | | | | | | | | | | | | | | Remember out-of-order block headers along with disk positions. This is likely the simplest and least-impact way to make -reindex work with headers first. Based on top of #4468.
* | Rename setBlockIndexValid to setBlockIndexCandidatesPieter Wuille2014-10-141-15/+15
| |
* | Add height to "Requesting block" debugR E Broadley2014-10-141-1/+2
| |
* | Better logging of stallingR E Broadley2014-10-141-1/+3
| |
* | Improve getheaders (sending) loggingR E Broadley2014-10-141-1/+4
| |
* | Remove CheckMinWork, as we always know all parent headersPieter Wuille2014-10-141-17/+0
| |
* | RPC additions after headers-firstPieter Wuille2014-10-141-2/+7
| |
* | Headers-first synchronizationPieter Wuille2014-10-141-274/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many changes: * Do not use 'getblocks', but 'getheaders', and use it to build a headers tree. * Blocks are fetched in parallel from all available outbound peers, using a limited moving window. When one peer stalls the movement of the window, it is disconnected. * No more orphan blocks. At all. We only ever request a block for which we have verified the headers, and store it to disk immediately. This means that a disk-fill attack would require PoW. * Require protocol version 31800 for every peer (released in december 2010). * No more syncnode (we sync from everyone we can, though limited to 1 during initial *headers* sync). * Introduce some extra named constants, comments and asserts.
* | Merge pull request #5059Gavin Andresen2014-10-091-9/+9
|\ \ | | | | | | | | | | | | | | | | | | dbca89b Trigger -alertnotify if network is upgrading without you (Gavin Andresen) e01a793 Refactor -alertnotify code (Gavin Andresen) Signed-off-by: Gavin Andresen <[email protected]>
| * | Trigger -alertnotify if network is upgrading without youGavin Andresen2014-10-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a -regetest-only undocumented (for regression testing only) command-line option -blockversion=N to set block.nVersion. Adds to the "has the rest of the network upgraded to a block.nVersion we don't understand" code so it calls -alertnotify when 51 of the last 100 blocks are up-version. But it only alerts once, not with every subsequent new, upversion block. And adds a forknotify.py regression test to make sure it works. Tested using forknotify.py: Before adding CAlert::Notify, get: Assertion failed: -alertnotify did not warn of up-version blocks Before adding code to only alert once: Assertion failed: -alertnotify excessive warning of up-version blocks After final code in this pull: Tests successful
| * | Refactor -alertnotify codeGavin Andresen2014-10-091-8/+3
| | | | | | | | | | | | Refactor common -alertnotify code into static CAlert::Notify method.
* | | Merge pull request #4834Pieter Wuille2014-10-081-37/+30
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille) ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille) 058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille) c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille) f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
| * | Get rid of the dummy CCoinsViewCache constructor argPieter Wuille2014-09-241-5/+5
| | |
| * | Do not keep fully spent but unwritten CCoins entries cached.Pieter Wuille2014-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing CCoins entries directly in CCoinsMap, store a CCoinsCacheEntry which additionally keeps track of whether a particular entry is: * dirty: potentially different from its parent view. * fresh: the parent view is known to not have a non-pruned version. This allows us to skip non-dirty cache entries when pushing batches of changes up, and to remove CCoins entries about transactions that are fully spent before the parent cache learns about them.
| * | Get rid of CCoinsView's SetCoins and SetBestBlock.Pieter Wuille2014-09-231-3/+1
| | | | | | | | | | | | | | | | | | 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.
| * | Use ModifyCoins instead of mutable GetCoins.Pieter Wuille2014-09-231-27/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the mutable non-copying GetCoins method with a ModifyCoins, which returns an encapsulated iterator, so we can keep track of concurrent modifications (as iterators can be invalidated by those) and run cleanup code after a modification is finished. This also removes the overloading of the 'GetCoins' name.
* | | fix a lock indentation in main.cppPhilip Kaufmann2014-10-061-5/+5
| |/ |/| | | | | - also ensure alphabetical ordering in file header
* | Merge pull request #5036Wladimir J. van der Laan2014-10-061-18/+20
|\ \ | | | | | | | | | | | | eb6b3b2 Update English translation (Wladimir J. van der Laan) b9b2e3f Don't translate state.Abort() messages (Wladimir J. van der Laan)
| * | Don't translate state.Abort() messagesWladimir J. van der Laan2014-10-021-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | There is only one message passed to AbortNode() that makes sense to translate to the user specifically: Disk space is low. For the others show a generic message and refer to debug.log for details. Reduces the number of confusing jargon translation messages.
* | | Merge pull request #4890Wladimir J. van der Laan2014-10-061-9/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | e790c37 Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker (Pieter Wuille) 5c1e798 Make signature cache optional (Pieter Wuille) c7829ea Abstract out SignatureChecker (Pieter Wuille)
| * | | Replace SCRIPT_VERIFY_NOCACHE by flag directly to checkerPieter Wuille2014-10-021-8/+7
| | | |
| * | | Make signature cache optionalPieter Wuille2014-10-021-1/+1
| |/ /
* | | Merge pull request #4887Pieter Wuille2014-10-031-9/+9
|\ \ \ | | | | | | | | | | | | 4bb30a1 Correct logging AcceptBlock()->AcceptBlockHeader() (R E Broadley)
| * | | Correct logging AcceptBlock()->AcceptBlockHeader()R E Broadley2014-10-031-9/+9
| |/ /
* | | Merge pull request #4978Wladimir J. van der Laan2014-10-021-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | 938bcce CAutoFile: make file private (Philip Kaufmann) 0c35486 CBufferedFile: add explicit close function (Philip Kaufmann) c9fb27d CBufferedFile: convert into a non-refcounted RAII wrapper (Philip Kaufmann)
| * | CBufferedFile: convert into a non-refcounted RAII wrapperPhilip Kaufmann2014-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - it now takes over the passed file descriptor and closes it in the destructor - this fixes a leak in LoadExternalBlockFile(), where an exception could cause the file to not getting closed - disallow copies (like recently added for CAutoFile) - make nType and nVersion private
* | | Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-10-021-1/+2
| | | | | | | | | | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* | | Revert merge of pull #4845Wladimir J. van der Laan2014-10-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It breaks the new mingw tests! See - https://travis-ci.org/bitcoin/bitcoin/jobs/36845581 - https://travis-ci.org/bitcoin/bitcoin/jobs/36845582 This reverts commit 470590277782cce2fe73275c74523aef59a51eab, 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0, a25fd6be138ff2bff7e2ad6a1a789db523c0193f.
* | | Merge pull request #4845Wladimir J. van der Laan2014-10-021-1/+2
|\ \ \ | |/ / |/| | | | | | | | | | | 4705902 Avoid introducing a virtual into CChainParams (Wladimir J. van der Laan) 5e2e7fc Suggested corrections on comments, variable names. Also new test case testing the PoW skip in UNITTEST. (SergioDemianLerner) a25fd6b Switch testing framework from MAIN to new UNITTEST network (SergioDemianLerner)
| * | Suggested corrections on comments, variable names.SergioDemianLerner2014-09-291-2/+2
| | | | | | | | | | | | Also new test case testing the PoW skip in UNITTEST.
| * | Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-09-291-0/+1
| | | | | | | | | | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* | | Merge pull request #5017Wladimir J. van der Laan2014-10-021-2/+4
|\ \ \ | | | | | | | | | | | | | | | | f74fc9b Print input index when signature validation fails, to aid debugging. (Mark Friedenbach) 217a5c9 When transaction outputs exceed inputs, show the offending amounts so as to aid debugging. (Mark Friedenbach)
| * | | Print input index when signature validation fails, to aid debugging.Mark Friedenbach2014-10-011-1/+1
| | | |
| * | | When transaction outputs exceed inputs, show the offending amounts so as to ↵Mark Friedenbach2014-10-011-1/+3
| |/ / | | | | | | | | | aid debugging.
* | | Merge pull request #4926Pieter Wuille2014-10-021-8/+7
|\ \ \ | | | | | | | | | | | | 584a358 Do merkle root and txid duplicates check simultaneously (Pieter Wuille)
| * | | Do merkle root and txid duplicates check simultaneouslyPieter Wuille2014-09-241-8/+7
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the txid duplicates check into BuildMerkleTree, where it can be done much more efficiently (without needing to build a full txid set to detect duplicates). The previous version (using the std::set<uint256> to detect duplicates) was also slightly too weak. A block mined with actual duplicate transactions (which is invalid, due to the inputs of the duplicated transactions being seen as double spends) would trigger the duplicates logic, resulting in the block not being stored on disk, and rerequested. This change fixes that by only triggering in the case of duplicated transactions that can actually result in an identical merkle root.
* | | Merge pull request #4234Wladimir J. van der Laan2014-10-011-13/+13
|\ \ \ | |_|/ |/| | | | | | | | c122f55 qt: Register CAmount metatype (Wladimir J. van der Laan) a372168 Use a typedef for monetary values (Mark Friedenbach)
| * | Use a typedef for monetary valuesMark Friedenbach2014-09-261-13/+13
| | |
* | | Merge pull request #4796Pieter Wuille2014-09-291-59/+6
|\ \ \ | |/ / |/| | | | | | | | e8b5f0d Move CBlockIndex, CChain and related code out of main (jtimon) 6db83db Decouple CChain from mapBlockIndex (jtimon)
| * | Move CBlockIndex, CChain and related code out of mainjtimon2014-09-081-54/+0
| | |
| * | Decouple CChain from mapBlockIndexjtimon2014-09-081-5/+6
| | |
* | | autofile: don't copy CAutoFile by valueCory Fields2014-09-251-4/+4
| |/ |/|
* | Avoid copying undo dataPieter Wuille2014-09-171-8/+11
| |
* | Merge pull request #4555Wladimir J. van der Laan2014-09-171-9/+4
|\ \ | | | | | | | | | | | | | | | | | | 6dcfda2 Don't pass nHashType to EvalScript nor CheckSig (jtimon) 2b23a87 Don't pass nHashType to VerifyScript (jtimon) ce3649fb Remove CScriptCheck::nHashType (was always 0) (jtimon) 358562b Remove unused function main:VerifySignature (jtimon)
| * | Don't pass nHashType to EvalScript nor CheckSigjtimon2014-09-121-1/+1
| | |