aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #3155 from wtogami/split_proto_varWladimir J. van der Laan2013-11-081-3/+2
|\ | | | | Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSION
| * Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSIONWarren Togami2013-10-251-3/+2
| | | | | | | | | | INIT_PROTO_VERSION is the initial version, after a succesful version/verack it is increased to a negotiated version. MIN_PEER_PROTO_VERSION could be a different value to disconnect from peers older than a specified version.
* | No more fHaveGUIWladimir J. van der Laan2013-11-041-1/+0
| | | | | | | | | | | | No more specific handling of GUI in bitcoin core. Replace the last usage of fHaveGUI with a fForceServer parameter on AppInit2.
* | process received messages one at a time without sleeping between messagesPatrick Strateman2013-11-031-1/+9
| |
* | Refactor: CTxMempool class to its own txmempool.{cpp,h}Gavin Andresen2013-11-041-191/+67
| |
* | Merge pull request #3087Pieter Wuille2013-11-021-19/+32
|\ \ | | | | | | | | | | | | caca6aa Make some globals in main non-public. (Pieter Wuille) 85eb2ce Do not use the redundant BestInvalidWork record in the block database. (Pieter Wuille)
| * | Make some globals in main non-public.Pieter Wuille2013-11-011-6/+21
| | | | | | | | | | | | | | | | | | This means they are declared static, and their extern definition in main.h is removed. Also moved CBlockIndexWorkComparator to the .cpp file.
| * | Do not use the redundant BestInvalidWork record in the block database.Pieter Wuille2013-11-011-14/+12
| | | | | | | | | | | | | | | | | | 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 #3114Pieter Wuille2013-11-011-2/+3
|\ \ \ | |/ / |/| | | | | a616206 Give peer time-adjustment data an own lock (Pieter Wuille)
| * | Give peer time-adjustment data an own lockPieter Wuille2013-10-261-2/+3
| |/ | | | | | | | | Instead of relying on cs_main (defined in a different module) to prevent concurrent access to it.
* | re-work -debug switch handlingPhilip Kaufmann2013-10-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | - re-work -debug help message text - make -debug log every debugging information again (even all categories) - remove unneeded fDebug checks in front of LogPrint()/qDebug(), as that check is done in LogPrintf() when category is != NULL (true for all LogPrint() calls - remove fDebug ONLY in code which is NOT performance-critical - harmonize addrman category name - deprecate -debugnet usage, should be used via -debug=net and remove the corresponding global
* | Merge pull request #3115 from sipa/walletmainGavin Andresen2013-10-291-119/+46
|\ \ | | | | | | Interaction cleanups between main and wallet
| * | Break dependency of init on wallet.Pieter Wuille2013-10-261-21/+0
| | | | | | | | | | | | | | | | | | This required some code movement (what was CWalletTx::AcceptToMemoryPool doing in main?), and adding a few explicit includes that used to be implicit through init.h.
| * | Use boost signals for callbacks from main to walletPieter Wuille2013-10-261-69/+46
| | |
| * | Remove broken PrintWallet functionalityPieter Wuille2013-10-261-10/+0
| | |
| * | Do not treat fFromMe transaction differently when broadcastingPieter Wuille2013-10-261-19/+0
| |/
* | Generalize the remove-outputs check for fully-prunable transactions.Pieter Wuille2013-10-281-6/+6
| | | | | | | | | | | | | | | | | | Instead of explicitly testing for the presence of any output, and dealing with this case specially, just interpret it as an empty CCoins. The case previously caught using the HaveCoins check, is now handled by the generic outs != outsBlock test.
* | Fix comparison tool by asking for blocks more aggressivelyMatt Corallo2013-10-271-2/+2
| |
* | Send multiple inv messages if mempool.size > MAX_INV_SZGavin Andresen2013-10-261-2/+4
|/ | | | | | Changes the response to the 'mempool' command so that if the memory pool has more than MAX_INV_SZ transactions (50,000) it will respond with multiple 'inv' messages.
* Merge pull request #2738 from jgarzik/op_returnGavin Andresen2013-10-211-2/+13
|\ | | | | Relay OP_RETURN data TxOut as standard transaction type.
| * Relay OP_RETURN data TxOut as standard transaction typeJeff Garzik2013-10-021-2/+13
| |
* | Merge pull request #2840 from sipa/nosendlockGavin Andresen2013-10-201-21/+36
|\ \ | | | | | | Allow SendMessages to run partially without cs_main
| * | Push down cs_main locking in ProcessMessagePieter Wuille2013-10-151-5/+18
| | |
| * | Allow SendMessages to run partially without cs_mainPieter Wuille2013-10-151-16/+18
| | | | | | | | | | | | | | | | | | SendMessages() tries to acquire a cs_main lock now, but this isn't nessecary for much of its functionality. Move those parts out of the locked section, so they can always be performed, and we hold cs_main for a shorter time.
* | | 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
| | | |
* | | | Merge pull request #2884 from gavinandresen/canonicalsizes2Gavin Andresen2013-10-191-1/+0
|\ \ \ \ | | | | | | | | | | Reject non-canonically-encoded CompactSize
| * | | | Reject non-canonically-encoded sizesGavin Andresen2013-08-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The length of vectors, maps, sets, etc are serialized using Write/ReadCompactSize -- which, unfortunately, do not use a unique encoding. So deserializing and then re-serializing a transaction (for example) can give you different bits than you started with. That doesn't cause any problems that we are aware of, but it is exactly the type of subtle mismatch that can lead to exploits. With this pull, reading a non-canonical CompactSize throws an exception, which means nodes will ignore 'tx' or 'block' or other messages that are not properly encoded. Please check my logic... but this change is safe with respect to causing a network split. Old clients that receive non-canonically-encoded transactions or blocks deserialize them into CTransaction/CBlock structures in memory, and then re-serialize them before relaying them to peers. And please check my logic with respect to causing a blockchain split: there are no CompactSize fields in the block header, so the block hash is always canonical. The merkle root in the block header is computed on a vector<CTransaction>, so any non-canonical encoding of the transactions in 'tx' or 'block' messages is erased as they are read into memory by old clients, and does not affect the block hash. And, as noted above, old clients re-serialize (with canonical encoding) 'tx' and 'block' messages before relaying to peers.
* | | | | Merge pull request #3008 from gavinandresen/CENTruleGavin Andresen2013-10-191-6/+9
|\ \ \ \ \ | | | | | | | | | | | | Two small free transaction policy changes
| * | | | | Lower maximum size for free transaction creationGavin Andresen2013-10-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes the maximum size of a free transaction that will be created from 10,000 bytes to 1,000 bytes. The idea behind this change is to make the free transaction area available to a greater number of people; with the default 27K-per-block, just three very-large very-high-priority transactions could fill the space.
| * | | | | Remove CENT-output free transaction rule when relayingGavin Andresen2013-10-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the (relay/mempool) rule that all outputs of free transactions must be greater than 0.01 XBT. Dust spam is now taken care of by making dusty outputs non-standard.
* | | | | | Merge pull request #3083 from sipa/chainlocatorGavin Andresen2013-10-151-85/+38
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | CBlockLocator improvements & move to core
| * | | | | Reimplement CBlockLocator's chain-related logic in CChain.Pieter Wuille2013-10-151-85/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes a few unused CBlockLocator methods, and moves the construction and fork-finding logic to CChain (which can do these more efficiently, as it has a height-indexable chain available). It also makes CBlockLocator independent from the validation code.
* | | | | | replace %zu with %"PRIszu" macro to prevent compiler warningsPhilip Kaufmann2013-10-151-9/+9
|/ / / / /
* | | | | Merge pull request #3077 from sipa/chainGavin Andresen2013-10-141-96/+95
|\ \ \ \ \ | | | | | | | | | | | | Refactor/encapsulate chain globals into a CChain class
| * | | | | Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-96/+95
| | |_|/ / | |/| | |
* | | | | Merge pull request #2937Pieter Wuille2013-10-131-4/+81
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | 971bb3e Added ping time measurement. New RPC "ping" command to request ping. Implemented "pong" message handler. New "pingtime" field in getpeerinfo, to provide results to user. New "pingwait" field, to show pings still in flight, to better see newly lagging peers. (Josh Lehan)
| * | | | Added ping time measurement.Josh Lehan2013-10-041-4/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New RPC "ping" command to request ping. Implemented "pong" message handler. New "pingtime" field in getpeerinfo, to provide results to user. New "pingwait" field, to show pings still in flight, to better see newly lagging peers.
* | | | | style-police: fixed badly readable code in ProcessMessage()Philip Kaufmann2013-10-071-4/+6
| | | | | | | | | | | | | | | | | | | | - I introduced the problem and fixed it with better readable code
* | | | | special case DoS value == 0 in ProcessMessage()Philip Kaufmann2013-10-041-4/+4
|/ / / / | | | | | | | | | | | | | | | | - prevents unneeded log messages, which could make users think something bad was happening
* | | | Merge pull request #2947 from gmaxwell/theyre_maturing_faster_these_daysGavin Andresen2013-10-031-1/+1
|\ \ \ \ | |_|_|/ |/| | | [wallet] Consider generated coins mature at COINBASE_MATURITY+1
| * | | [wallet] Consider generated coins mature at COINBASE_MATURITY+1Gregory Maxwell2013-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We're not seeing large reorgs that would justify waiting a large amount past the rule required maturity, and the extra three hours is just a nuisance. Take one more block to at least give the 100th block time to propagate.
* | | | internal miner: move 2 globals from main to minerPhilip Kaufmann2013-09-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | - moves 2 global variables from main.cpp/h to miner.cpp/h - also removes 2 unneded includes in miner.cpp, that come from miner.h already
* | | | Skip unspendable outputs in consistency checkPieter Wuille2013-09-241-0/+1
| | | |
* | | | Merge pull request #2949 from gmaxwell/fewer_fee_footgunsGavin Andresen2013-09-221-1/+6
|\ \ \ \ | | | | | | | | | | [raw] reject insanely high fees by default in sendrawtransaction
| * | | | [raw] reject insanely high fees by default in sendrawtransactionGregory Maxwell2013-08-281-1/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have been several incidents where mainnet experimentation with raw transactions resulted in insane fees. This is hard to prevent in the raw transaction api because the inputs may not be known. Since sending doesn't work if the inputs aren't known, we can catch it there. This rejects fees > than 10000 * nMinRelayTxFee or 1 BTC with the defaults and can be overridden with a bool at the rpc.
* | / / Replace printf with LogPrintf / LogPrintGavin Andresen2013-09-181-76/+74
| |/ / |/| |
* | | Merge pull request #2982 from gmaxwell/20130908_ccoins_corruptGregory Maxwell2013-09-101-1/+6
|\ \ \ | | | | | | | | Longer term workaround for chainstate corruption from negative versions.
| * | | Longer term workaround for chainstate corruption from negative versions.Gregory Maxwell2013-09-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also makes negative transaction versions non-standard. This avoids an issue triggered in block 256818 where transactions with negative version numbers were incorrectly serialized into the UTXO set. On restart nodes detect the inconsistency and refuse to start so long as a block with these transactions is inside the self-consistency check window, logging "coin database inconsistencies found". The software recommends reindexing, but reindexing does not correct the problem. This should be fixed by changing the chainstate serialization, but working around it seems harmless for now because the version is not used by any network rule currently. A patch free workaround is to start with -checklevel=2 which skips the consistency checks, but the IsStandard change is important for miners in order to protect unpatched nodes.
* | | | fix some cosmetic glitches in the codebasePhilip Kaufmann2013-09-091-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rename URL into URI in paymentserver where correct - add some missing Qt-coding-stuff in paymentserver - change QSpinBox to QLineEdit as base for BitcoinAmountField in .ui files (as this is the result when converting the BAF back into base) - remove some c_str() and replace with QString::fromStdString() - remove several new-lines - remove unneeded spaces - indentation fixes