aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* remove GetBoolArg() fDefault parameter defaulting to falsePhilip Kaufmann2013-06-011-2/+2
| | | | | | | | - explicitly set the default of all GetBoolArg() calls - rework getarg_test.cpp and util_tests.cpp to cover this change - some indentation fixes - move macdockiconhandler.h include in bitcoin.cpp to the "our headers" section
* Merge pull request #2644 from sipa/constfindblockJeff Garzik2013-05-301-34/+20
|\ | | | | Make FindBlockByHeight constant-time
| * Make FindBlockByHeight constant-time.Pieter Wuille2013-05-121-34/+20
| | | | | | | | | | | | | | | | | | | | | | | | Remove the pnext pointer in CBlockIndex, and replace it with a vBlockIndexByHeight vector (no effect on memory usage). pnext can now be replaced by vBlockIndexByHeight[nHeight+1], but FindBlockByHeight becomes constant-time. This also means the entire mapBlockIndex structure and the block index entries in it become purely blocktree-related data, and independent from the currently active chain, potentially allowing them to be protected by separate mutexes in the future.
* | Merge pull request #2657 from gmaxwell/its_after_may15_foreverJeff Garzik2013-05-301-23/+0
|\ \ | | | | | | It's after 2013-05-15 forever now, so remove the code for the May 15 fork
| * | It's after 2013-05-15 forever now, so remove the code for the May 15 fork.Gregory Maxwell2013-05-161-23/+0
| |/
* | More bestblock records in walletsPieter Wuille2013-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | Write bestblock records in wallets: * Every 20160 blocks synced, no matter what (before: none during IBD) * Every 144 blocks after IBD (before: for every block, slow) * When creating a new wallet * At shutdown This should result in far fewer spurious rescans.
* | CreateNewBlock performance improvementsPieter Wuille2013-05-211-19/+9
|/
* Merge pull request #2577 from gavinandresen/fee_bandaidGavin Andresen2013-05-041-16/+25
|\ | | | | Treat dust outputs as non-standard, un-hardcode TX_FEE constants
| * Un-hardcode TX_FEE constantsGavin Andresen2013-05-031-15/+24
| | | | | | | | | | | | | | Allow setting of MIN_TX_FEE / MIN_RELAY_TX_FEE with -mintxfee / -mintxrelayfee Default values are the same (0.0001 BTC).
| * Define dust transaction outputs, and make them non-standardGavin Andresen2013-05-031-1/+1
| |
* | Allow the default key to be unavailablePieter Wuille2013-04-251-1/+4
|/ | | | This solves the issue where no default key can be added after -salvagewallet.
* Do not invoke DoS for non-canonical sigsPieter Wuille2013-04-181-1/+9
|
* Require strictly-standard encodings in mempoolPieter Wuille2013-04-141-1/+1
|
* Use a uint256 for bnChainWorkPieter Wuille2013-04-121-23/+25
| | | | | | | | | Every block index entry currently requires a separately-allocated CBigNum. By replacing them with uint256, it's just 32 bytes extra in CBlockIndex itself. This should save us a few megabytes in RAM, and less allocation overhead.
* Merge pull request #2478 from sipa/fullhashGavin Andresen2013-04-091-29/+29
|\ | | | | Always print full hashes (tx, block, inv)
| * Always print full hashes (tx, block, inv)Pieter Wuille2013-04-071-29/+29
| |
* | Make sure we always have a node to do IBD fromPieter Wuille2013-04-071-12/+6
|/ | | | | | | | | This introduces the concept of the 'sync node', which is the one we asked for missing blocks. In case the sync node goes away, a new one will be selected. For now, the heuristic is very simple, but it can easily be extended later to add better policies.
* small indentation, space, formatting fixes (no code changes)Philip Kaufmann2013-04-061-6/+6
|
* Merge pull request #2423 from TheBlueMatt/limitedmapalreadyaskedforGavin Andresen2013-04-031-1/+0
|\ | | | | Limited mapAlreadyAskedFor
| * Revert "Actually use mapAlreadyAskedFor."Matt Corallo2013-04-011-1/+0
| | | | | | | | | | | | | | This reverts commit 643160f6e7e5e8ca84bc7d2c1a0f37d9cf43a6e1. Turns out this commit was useless after a more careful reading of CNode::AskFor
* | Merge pull request #2357 from gavinandresen/shutdowncleanupGavin Andresen2013-04-031-97/+48
|\ \ | | | | | | Thread / shutdown cleanup
| * | Clean up shutdown processGavin Andresen2013-04-031-15/+14
| | |
| * | Port Thread* methods to boost::thread_groupGavin Andresen2013-04-031-8/+4
| | |
| * | Rename util.h Sleep --> MilliSleepGavin Andresen2013-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Two reasons for this change: 1. Need to always use boost::thread's sleep, even on Windows, so the sleeps can be interrupted (prior code used Windows' built-in Sleep). 2. I always forgot what units the old Sleep took.
| * | Shutdown cleanup prep-workGavin Andresen2013-04-031-73/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a boost::thread_group object at the qt/bitcoind main-loop level that will hold pointers to all the main-loop threads. This will replace the vnThreadsRunning[] array. For testing, ported the BitcoinMiner threads to use its own boost::thread_group.
* | | Merge pull request #2453 from sipa/txstatsGavin Andresen2013-04-031-2/+3
|\ \ \ | |/ / |/| | Update transaction statistics
| * | Update transaction statisticsPieter Wuille2013-04-041-2/+3
| |/ | | | | | | | | | | | | | | As these were not updated when 'backporting' the 225430 checkpoint into head. Additionally, also report verification progress in debug.log, and tweak the sigcheck-verification-speed-factor a bit.
* | Merge pull request #2420 from sipa/globcleanGavin Andresen2013-04-021-0/+26
|\ \ | |/ |/| Global cleanups
| * Clean up global datastructures at shutdown.Pieter Wuille2013-03-291-0/+26
| | | | | | | | This should make detecting leaks much easier.
* | Process getdata invs separately until send buffer overflowsPieter Wuille2013-03-301-94/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There exists a per-message-processed send buffer overflow protection, where processing is halted when the send buffer is larger than the allowed maximum. This protection does not apply to individual items, however, and getdata has the potential for causing large amounts of data to be sent. In case several hundreds of blocks are requested in one getdata, the send buffer can easily grow 50 megabytes above the send buffer limit. This commit breaks up the processing of getdata requests, remembering them inside a CNode when too many are requested at once.
* | Use per-message send buffer, rather than per connectionPieter Wuille2013-03-291-5/+8
| |
* | Some fixes to CNetMessage processingPieter Wuille2013-03-291-14/+14
| | | | | | | | | | | | * Change CNode::vRecvMsg to be a deque instead of a vector (less copying) * Make sure to acquire cs_vRecvMsg in CNode::CloseSocketDisconnect (as it may be called without that lock).
* | P2P: parse network datastream into header/data components in socket threadJeff Garzik2013-03-291-38/+27
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces CNode::vRecv buffer with a vector of CNetMessage's. This simplifies ProcessMessages() and eliminates several redundant data copies. Overview: * socket thread now parses incoming message datastream into header/data components, as encapsulated by CNetMessage * socket thread adds each CNetMessage to a vector inside CNode * message thread (ProcessMessages) iterates through CNode's CNetMessage vector Message parsing is made more strict: * Socket is disconnected, if message larger than MAX_SIZE or if CMessageHeader deserialization fails (latter is impossible?). Previously, code would simply eat garbage data all day long. * Socket is disconnected, if we fail to find pchMessageStart. We do not search through garbage, to find pchMessageStart. Each message must begin precisely after the last message ends. ProcessMessages() always processes a complete message, and is more efficient: * buffer is always precisely sized, using CDataStream::resize(), rather than progressively sized in 64k chunks. More efficient for large messages like "block". * whole-buffer memory copy eliminated (vRecv -> vMsg) * other buffer-shifting memory copies eliminated (vRecv.insert, vRecv.erase)
* Before 15 May, limit created block size to 500KGavin Andresen2013-03-171-2/+6
|
* CheckBlock rule until 15-May for 10,000 BDB lock compatibilityGavin Andresen2013-03-171-0/+19
|
* Merge pull request #2186 from Diapolo/misc_stuffWladimir J. van der Laan2013-02-231-13/+11
|\ | | | | small changes in init, main, checkpoints.h and bitcoin-qt.pro
| * small changes in init, main, checkpoints.h and bitcoin-qt.proPhilip Kaufmann2013-02-201-13/+11
| | | | | | | | | | | | | | | | | | - remove an unneeded MODAL flag, as MSG_ERROR sets MODAL - re-order an if-clause in main to have bool checks before a function call - fix some log messages that used wrong function names - make a log message use a correct ellipsis - remove some unneded spaces, brackets and line-breaks - fix style for adding files in the Qt project
* | Merge pull request #2221 from sipa/perfoGavin Andresen2013-02-221-18/+19
|\ \ | | | | | | Various performance tweaks to CCoinsView
| * | Various performance tweaks to CCoinsViewPieter Wuille2013-01-261-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | Merge pull request #2229 from sipa/preallocGavin Andresen2013-02-221-2/+6
|\ \ \ | |_|/ |/| | Native versions for AllocateFileRange()
| * | Drop padding in blk* when finalizing filePieter Wuille2013-01-301-2/+6
| | |
* | | Improve block database load error reportingPieter Wuille2013-02-171-0/+12
| | |
* | | Merge pull request #2279 from sipa/cvrbip30Gavin Andresen2013-02-061-1/+1
|\ \ \ | | | | | | | | Bugfix CValidationResult for BIP30 + add DoS
| * | | Bugfix CValidationResult for BIP30 + add DoSPieter Wuille2013-02-061-1/+1
| | | |
* | | | Do not call ResendWalletTransactions when reindexing, importing or on IBDRubén Darío Ponticelli2013-02-051-1/+6
|/ / / | | | | | | | | | | | | Calling ResendWalletTransactions when reindexing, importing or on IBD spams other nodes with our old transactions, because they become unconfirmed.
* | | Merge branch 'reindexgen' of git://github.com/sipa/bitcoinGavin Andresen2013-02-051-19/+27
|\ \ \
| * | | Make sure the genesis block is present after reindexPieter Wuille2013-02-011-19/+27
| | | |
* | | | Merge pull request #2273 from gavinandresen/txsizeGavin Andresen2013-02-051-0/+8
|\ \ \ \ | | | | | | | | | | Make transactions larger than 100K non-standard
| * | | | Make transactions larger than 100K non-standardGavin Andresen2013-02-051-0/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extremely large transactions with lots of inputs can cost the network almost as much to process as they cost the sender in fees. We would never create transactions larger than 100K big; this change makes transactions larger than 100K non-standard, so they are not relayed/mined by default. This is most important for miners that might create blocks larger than 250K big, who could be vulnerable to a make-your-blocks-so-expensive-to-verify-they-get-orphaned attack.
* / / / Bugfix: Enable ConnectBestBlock to properly report back validation problems, ↵Luke Dashjr2013-01-311-4/+7
|/ / / | | | | | | | | | | | | | | | and ensure orphan processing (when their parents are found) cannot be used to counter-DDoS the node providing the parent Also fix a minor typo