aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | checkpoints: Decouple checkpoints from ParamsCory Fields2015-04-301-11/+16
| | | | | | | | | | | | | | | | | | | | Pass checkpoint data in as necessary
* | | | | Merge pull request #6085Wladimir J. van der Laan2015-05-041-22/+23
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | b05a89b Non-grammatical language improvements (Luke Dashjr) 7e6d23b Bugfix: Grammar fixes (Corinne Dashjr)
| * | | | | Non-grammatical language improvementsLuke Dashjr2015-05-021-12/+13
| | | | | |
| * | | | | Bugfix: Grammar fixesCorinne Dashjr2015-05-011-10/+10
| | | | | |
* | | | | | Replace mruset setAddrKnown with CRollingBloomFilter addrKnownGavin Andresen2015-04-301-5/+5
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a probabilistic bloom filter to keep track of which addresses we think we have given our peers, instead of a list. This uses much less memory, at the cost of sometimes failing to relay an address to a peer-- worst case if the bloom filter happens to be as full as it gets, 1-in-1,000. Measured memory usage of a full mruset setAddrKnown: 650Kbytes Constant memory usage of CRollingBloomFilter addrKnown: 37Kbytes. This will also help heap fragmentation, because the 37K of storage is allocated when a CNode is created (when a connection to a peer is established) and then there is no per-item-remembered memory allocation. I plan on testing by restarting a full node with an empty peers.dat, running a while with -debug=addrman and -debug=net, and making sure that the 'addr' message traffic out is reasonable. (suggestions for better tests welcome)
* | | | | Merge pull request #5918Pieter Wuille2015-04-281-4/+5
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | f7303f9 Use equivalent PoW for non-main-chain requests (Pieter Wuille)
| * | | | Use equivalent PoW for non-main-chain requestsPieter Wuille2015-04-221-4/+5
| |/ / /
* | | | Merge pull request #5662Wladimir J. van der Laan2015-04-281-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | 00dcaf4 Change download logic to allow calling getheaders/getdata on inbound peers (Suhas Daftuar)
| * | | | Change download logic to allow calling getheaders/getdata on inbound peersSuhas Daftuar2015-04-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SendMessages will now call getheaders on both inbound and outbound peers, once the headers chain is close to synced. It will also try downloading blocks from inbound peers once we're out of initial block download (so inbound peers will participate in parallel block fetching for the last day or two of blocks being downloaded).
* | | | | Add block pruning functionalitymrbandrews2015-04-221-30/+248
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a -prune=N option to bitcoind, which if set to N>0 will enable block file pruning. When pruning is enabled, block and undo files will be deleted to try to keep total space used by those files to below the prune target (N, in MB) specified by the user, subject to some constraints: - The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP), - N must be at least 550MB (chosen as a value for the target that could reasonably be met, with some assumptions about block sizes, orphan rates, etc; see comment in main.h), - No blocks are pruned until chainActive is at least 100,000 blocks long (on mainnet; defined separately for mainnet, testnet, and regtest in chainparams as nPruneAfterHeight). This unsets NODE_NETWORK if pruning is enabled. Also included is an RPC test for pruning (pruning.py). Thanks to @rdponticelli for earlier work on this feature; this is based in part off that work.
* | | | Merge pull request #6010Wladimir J. van der Laan2015-04-201-4/+5
|\ \ \ \ | | | | | | | | | | | | | | | c1ecee8 Set nSequenceId when a block is fully linked (Suhas Daftuar)
| * | | | Set nSequenceId when a block is fully linkedSuhas Daftuar2015-04-141-4/+5
| | |_|/ | |/| | | | | | | | | | Also adds a test to CheckBlockIndex
* | | | Removed '()' where used without contents insideNicolas Benoit2015-04-201-2/+2
| | | | | | | | | | | | | | | | This additional patch removes '()' from current function name in LogPrintf output.
* | | | Replaced current function names with __func__ in LogPrintf() calls.Nicolas Benoit2015-04-201-17/+17
| | | |
* | | | Merge pull request #6012Wladimir J. van der Laan2015-04-161-0/+8
|\ \ \ \ | |_|_|/ |/| | | | | | | 0421c18 Fix CheckBlockIndex for reindex. (mrbandrews)
| * | | Fix CheckBlockIndex for reindex.mrbandrews2015-04-141-0/+8
| |/ / | | | | | | | | | | | | | | | Some tests in CheckBlockIndex require chainActive.Tip(), but when reindexing, chainActive has not been set on the first call to CheckBlockIndex. reindex.py starts a node, mines 3 blocks, stops, and reindexes with CheckBlockIndex enabled.
* | | Merge pull request #5997Wladimir J. van der Laan2015-04-151-6/+11
|\ \ \ | | | | | | | | | | | | 4e38217 Chainparams: Refactor: Remove redundant HashGenesisBlock() getter (Jorge Timón)
| * | | Chainparams: Refactor: Remove redundant HashGenesisBlock() getterJorge Timón2015-04-121-6/+11
| |/ /
* / / Chainparams: Cleanup: Delete CChainParams getters to attributes from ↵Jorge Timón2015-04-131-2/+4
|/ / | | | | | | Consensus::Params
* | Merge pull request #5969Wladimir J. van der Laan2015-04-081-1/+1
|\ \ | | | | | | | | | f14e687 Chainparams: Decouple CAlert from CChainParams (Jorge Timón)
| * | Chainparams: Decouple CAlert from CChainParamsJorge Timón2015-04-041-1/+1
| | |
* | | Add additional block index consistency checksSuhas Daftuar2015-04-011-0/+8
|/ / | | | | | | | | | | | | | | This adds more tests to CheckBlockIndex: - HAVE_DATA is true iff nTx > 0 - BLOCK_VALID_TRANSACTIONS is true iff nTx > 0 - BLOCK_VALID_TRANSACTIONS is true for a block and all parents iff nChainTx > 0
* | Merge pull request #5900Wladimir J. van der Laan2015-04-011-4/+142
|\ \ | |/ |/| | | 3fcfbc8 Add a consistency check for the block chain data structures (Pieter Wuille)
| * Add a consistency check for the block chain data structuresPieter Wuille2015-03-271-4/+142
| | | | | | | | | | | | This adds a -checkblockindex (defaulting to true for regtest), which occasionally does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and mapBlocksUnlinked.
* | Merge pull request #5940Wladimir J. van der Laan2015-03-301-1/+1
|\ \ | |/ |/| | | 0f5954c Regression test for ResendWalletTransactions (Gavin Andresen)
| * Regression test for ResendWalletTransactionsGavin Andresen2015-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a regression test for the wallet's ResendWalletTransactions function, which uses a new, hidden RPC command "resendwallettransactions." I refactored main's Broadcast signal so it is passed the best-block time, which let me remove a global variable shared between main.cpp and the wallet (nTimeBestReceived). I also manually tested the "rebroadcast unconfirmed every half hour or so" functionality by: 1. Running bitcoind -connect=0.0.0.0:8333 2. Creating a couple of send-to-self transactions 3. Connect to a peer using -addnode 4. Waited a while, monitoring debug.log, until I see: ```2015-03-23 18:48:10 ResendWalletTransactions: rebroadcast 2 unconfirmed transactions``` One last change: don't bother putting ResendWalletTransactions messages in debug.log unless unconfirmed transactions were actually rebroadcast.
* | Consensus: Refactor: Decouple pow.o from chainparams.oJorge Timón2015-03-261-3/+3
|/
* Includes: Refactor: Move CValidationInterface and CMainSignals out of mainJorge Timón2015-03-241-69/+8
|
* Merge pull request #5890Wladimir J. van der Laan2015-03-241-1/+1
|\ | | | | | | cd3d67c Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates (Alex Morcos)
| * Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidatesAlex Morcos2015-03-131-1/+1
| |
* | Merge pull request #5860Wladimir J. van der Laan2015-03-171-5/+16
|\ \ | |/ |/| | | 9c27379 Reduce fingerprinting through timestamps in 'addr' messages. (Pieter Wuille)
| * Reduce fingerprinting through timestamps in 'addr' messages.Pieter Wuille2015-03-171-5/+16
| | | | | | | | Suggested by Jonas Nick.
* | fix InvalidateBlock to repopulate setBlockIndexCandidatesAlex Morcos2015-03-121-1/+1
| |
* | Merge pull request #5871Wladimir J. van der Laan2015-03-111-2/+1
|\ \ | |/ |/| | | | | 3aa0130 test: remove fSkipProofOfWork (Wladimir J. van der Laan) 59bd89f test: Remove UNITTEST params (Wladimir J. van der Laan)
| * test: remove fSkipProofOfWorkWladimir J. van der Laan2015-03-091-2/+1
| | | | | | | | | | Not used, and REGTEST already allows creating blocks at the lowerst possible difficulty.
* | Merge pull request #5864Wladimir J. van der Laan2015-03-111-1/+4
|\ \ | |/ |/| | | bb6acff fix possible block db breakage during re-index (Cory Fields)
| * fix possible block db breakage during re-indexCory Fields2015-03-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When re-indexing, there are a few cases where garbage data may be skipped in the block files. In these cases, the indices are correctly written to the index db, however the pointer to the next position for writing in the current block file is calculated by adding the sizes of the valid blocks found. As a result, when the re-index is finished, the index db is correct for all existing blocks, but the next block will be written to an incorrect offset, likely overwriting existing blocks. Rather than using the sum of all valid blocks to determine the next write position, use the end of the last block written to the file. Don't assume that the current block is the last one in the file, since they may be read out-of-order.
* | Merge pull request #5852Wladimir J. van der Laan2015-03-091-2/+22
|\ \ | | | | | | | | | 51598b2 Reinitialize state in between individual unit tests. (Pieter Wuille)
| * | Reinitialize state in between individual unit tests.Pieter Wuille2015-03-031-2/+22
| | | | | | | | | | | | | | | This changes the TestingSetup fixture to be per-unit-test rather than global. Most tests don't need it, so it's only invoked in a few.
* | | Merge pull request #5442Wladimir J. van der Laan2015-03-091-1/+6
|\ \ \ | | | | | | | | | | | | dca799e Ignore getaddr messages on Outbound connections. (Ivan Pustogarov)
| * | | Ignore getaddr messages on Outbound connections.Ivan Pustogarov2015-02-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only time when a client sends a "getaddr" message is when he esatblishes an Outbound connection (see ProcessMessage() in src/main.cpp). Another bitcoin client is expected to receive a "getaddr" message only on Inbound connection. Ignoring "gettaddr" requests on Outbound connections can resolve potential privacy issues (and as was said such request normally do not happen anyway).
* | | | Merge pull request #5151Pieter Wuille2015-03-071-1/+1
|\ \ \ \ | |_|_|/ |/| | | | | | | eec3713 make CMessageHeader a dumb storage class (Cory Fields)
| * | | make CMessageHeader a dumb storage classCory Fields2015-02-251-1/+1
| | | | | | | | | | | | | | | | It shouldn't know or care about bitcoind's chain param selection
* | | | src/main.cpp: endian compatibility in packet checksum checkWladimir J. van der Laan2015-03-061-2/+1
| |_|/ |/| |
* | | Better fingerprinting protection for non-main-chain getdatas.Pieter Wuille2015-02-241-12/+10
|/ / | | | | | | | | With headers-first we can compare against the best header timestamp, rather than using checkpoints which require code updates to maintain.
* | Merge #5710: Add more information to errors in ReadBlockFromDiskPieter Wuille2015-02-161-4/+5
|\ \ | | | | | | | | | f5791c6 Add more information to errors in ReadBlockFromDisk (Wladimir J. van der Laan)
| * | Add more information to errors in ReadBlockFromDiskWladimir J. van der Laan2015-02-051-4/+5
| |/ | | | | | | | | | | A lot of times, disk corruption problems appear here. To facilitate debugging and troubleshooting, add position information to the error messages.
* | Merge #5699: Split logic to undo txin's off DisconnectBlock.Wladimir J. van der Laan2015-02-091-24/+38
|\ \ | | | | | | | | | eb1c2cd Split logic to undo txin's off DisconnectBlock. (Daniel Kraft)
| * | Split logic to undo txin's off DisconnectBlock.Daniel Kraft2015-02-031-24/+38
| |/ | | | | | | | | | | Instead, create a separate function that applies the undo operation of a CTxInUndo object onto a CCoinsViewCache. This method is used from DisconnectBlock.
* / Sanitize command strings before logging them.Gregory Maxwell2015-02-081-7/+7
|/ | | | | | | | | | Normally bitcoin core does not display any network originated strings without sanitizing or hex encoding. This wasn't done for strcommand in many places. This could be used to play havoc with a terminal displaying the logs, especially with printtoconsole in use. Thanks to Evil-Knievel for reporting this issue.