aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Send 'mempool' P2P command at the start of each P2P sessionJeff Garzik2012-09-241-0/+14
| |/ | | | | | | to query remote node mempool contents.
* / fix -Wformat warnings all over the sourcePhilip Kaufmann2012-10-011-17/+17
|/
* When rejected TX relay due to lack of fees, log full txidJeff Garzik2012-09-181-1/+1
|
* Merge pull request #1812 from jgarzik/misc-07Jeff Garzik2012-09-181-2/+54
|\ | | | | Two minor generic cleanups done during OP_DROP hacking
| * Improve debug logging, for mempool TXs that do not include sufficient feesJeff Garzik2012-09-091-2/+5
| |
| * Cosmetic: move CTransaction::GetMinFee out of header fileJeff Garzik2012-09-091-0/+49
| |
* | Apply BIP30 checks to all blocks except the two historic violations.Gregory Maxwell2012-09-091-3/+6
|/ | | | | | | | | Matt pointed out some time ago that there existed a minor DOS attack where a node in its initial block download could be wedged by an overwrite attack in a fork created between checkpoints before a time where BIP30 was enforced. Now that the BIP30 timestamp is irreversibly past the check can be more aggressive and apply to all blocks except the two historic violations.
* Merge branch 'testnet_alert' of git://github.com/gavinandresen/bitcoin-gitGavin Andresen2012-09-051-87/+3
|\
| * Refactor: move alert code from main to alert.cpp/hGavin Andresen2012-08-281-87/+3
| |
* | fix signed/unsigned usage in BlockFilePath()Philip Kaufmann2012-09-051-1/+1
| |
* | Add block file naming helper, BlockFilePath()Jeff Garzik2012-09-041-1/+7
| |
* | Merge pull request #1779 from xanatos/patch-15Jeff Garzik2012-09-041-1/+0
|\ \ | | | | | | Useless vector declaration
| * | Useless vector declarationxanatos2012-09-031-1/+0
| |/ | | | | The vector isn't referenced in the small code block it's declared. I don't see any "useful" side effect in its declaration.
* / Rename CreateThread to NewThreadWladimir J. van der Laan2012-08-291-2/+2
|/ | | | Prevent clash with win32 API symbol
* Special-case the last alert for alert-key-compromised caseGavin Andresen2012-08-271-0/+22
| | | | | | | | | | Hard-code a special nId=max int alert, to be broadcast if the alert key is ever compromised. It applies to all versions, never expires, cancels all previous alerts, and has a fixed message: URGENT: Alert key compromised, upgrade required Variations are not allowed (ignored), so an attacker with the private key cannot broadcast empty-message nId=max alerts.
* Alert system DoS preventionGavin Andresen2012-08-261-6/+19
| | | | | | | | | | | This fixes two alert system vulnerabilities found by Sergio Lerner; you could send peers unlimited numbers of invalid alert message to try to either fill up their debug.log with messages and/or keep their CPU busy checking signatures. Fixed by disconnecting/banning peers if they send 10 or more bad (invalid/expired/cancelled) alerts.
* Make 0-value outputs non-standardPieter Wuille2012-08-241-1/+4
|
* Avoid leaving return types or function attributes on their own lines.Gregory Maxwell2012-08-241-2/+1
|
* Do not accept orphan blocks in -loadblock modePieter Wuille2012-08-211-6/+9
|
* Reject block.nVersion<=1 blocks if network has upgraded to version=2Gavin Andresen2012-08-201-1/+10
| | | | | | | | | | | If 950 of the last 1,000 blocks are nVersion=2, reject nVersion=1 (or zero, but no bitcoin release has created block.nVersion=0) blocks -- 75 of last 100 on testnet3. This rule is being put in place now so that we don't have to go through another "express support" process to get what we really want, which is for every single new block to include the block height in the coinbase.
* Block height in coinbase as a new block ruleGavin Andresen2012-08-201-1/+27
| | | | | | | | | | | "Version 2" blocks are blocks that have nVersion=2 and have the block height as the first item in their coinbase. Block-height-in-the-coinbase is strictly enforced when version=2 blocks are a supermajority in the block chain (750 of the last 1,000 blocks on main net, 51 of 100 for testnet). This does not affect old clients/miners at all, which will continue producing nVersion=1 blocks, and which will continue to be valid.
* Merge pull request #1641 from jgarzik/mempoolJeff Garzik2012-08-201-3/+32
|\ | | | | Add 'mempool' P2P command, and extend 'getdata' behavior
| * Add 'mempool' P2P command, and extend 'getdata' behaviorJeff Garzik2012-07-311-3/+32
| | | | | | | | to permit downloading of mempool transactions from the remote peer.
* | Merge pull request #1678 from Diapolo/LoadExternalBlockFile_add_timerJeff Garzik2012-08-171-1/+3
|\ \ | | | | | | log how long LoadExternalBlockFile() takes in ms (Benchmark)
| * | log how long LoadExternalBlockFile() takes in ms (Benchmark)Philip Kaufmann2012-08-171-1/+3
| | |
* | | fix a compiler sign warning in OpenBlockFile()Philip Kaufmann2012-08-171-1/+1
|/ /
* | Merge pull request #1612 from luke-jr/opti_getblkhashGregory Maxwell2012-08-011-0/+19
|\ \ | | | | | | Optimize JSON-RPC getblockhash
| * | Optimize JSON-RPC getblockhashLuke Dashjr2012-08-011-0/+19
| | | | | | | | | | | | | | | - If the height is in the first half, start at the genesis block and go up, rather than at the top - Cache the last lookup and use it as a reference point if it's close to the next request, to make linear lookups always fast
* | | Merge pull request #1632 from luke-jr/spellingJeff Garzik2012-08-011-18/+18
|\ \ \ | | | | | | | | Fix spelling and grammar errors
| * | | Bugfix: Correct English grammar regarding "'s"Luke Dashjr2012-08-011-3/+3
| | | |
| * | | Bugfix: Fix a variety of misspellingsLuke Dashjr2012-08-011-15/+15
| | |/ | |/|
* / | Update Warning-strings to use a standard-formatPhilip Kaufmann2012-08-011-4/+4
|/ / | | | | | | | | | | | | | | | | - ensure warnings always start with "Warning:" and that the first character after ":" is written uppercase - ensure the first sentence in warnings ends with an "!" - remove unneeded spaces from Warning-strings - add missing Warning-string translation - remove a "\n" and replace with untranslatable "<br><br>"
* | Switch testnet3's message bytes to avoid connecting to old nodes.Gregory Maxwell2012-07-261-4/+4
| | | | | | | | | | | | | | | | The new bytes are based on "11" to appeal to Gavin's 11 fetish. This breaks existing testnet3 nodes as the blockchain files are also versioned. To upgrade a node delete everything except wallet.dat from your .bitcoin/testnet3 folder.
* | Handle should-never-happen case of orphan in mempoolGavin Andresen2012-07-261-0/+15
| |
* | When creating new blocks, sort 'paid' area by fee-per-kbGavin Andresen2012-07-261-31/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | Modify CreateNewBlock so that instead of processing all transactions in priority order, process the first 27K of transactions in priority order and then process the rest in fee-per-kilobyte order. This is the first, minimal step towards better a better fee-handling system for both miners and end-users; this patch should be easy to backport to the old versions of Bitcoin, and accomplishes the most important goal-- allow users to "buy their way in" to blocks using transaction fees.
* | Merge branch 'checknewblock' of git://github.com/luke-jr/bitcoinGavin Andresen2012-07-261-12/+40
|\ \
| * | Tests for CreateNewBlockLuke Dashjr2012-07-121-0/+9
| | |
| * | Merge branch 'checknewblock_0.6.0' into checknewblockLuke Dashjr2012-07-111-12/+31
| |\ \ | | |/ | |/| | | | | | | Conflicts: src/main.cpp
| | * CreateNewBlock: Check that the produced CBlock is acceptable (except for ↵Luke Dashjr2012-05-271-12/+31
| | | | | | | | | | | | | | | | | | proof-of-work and merkletree, since those need to be provided later) This throws an exception from CreateNewBlock otherwise, which is not safe without #1245!
* | | Let the comment in GetBlockValue() reflect the uncertainty about the time ↵Rune K. Svendsen2012-07-181-1/+1
| | | | | | | | | | | | interval between subsidy reductions
* | | Fix thread names after reviewGiel van Schijndel2012-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Fix wrong thread name for wallet *relocking* thread - Was named the unlocking thread * Use consistent naming Signed-off-by: Giel van Schijndel <[email protected]>
* | | Give threads a recognisable name to aid in debuggingGiel van Schijndel2012-07-171-0/+3
|/ / | | | | | | | | | | | | | | NOTE: These thread names are visible in gdb when using 'info threads'. Additionally both 'top' and 'ps' show these names *unless* told to display the command-line instead of task name. Signed-off-by: Giel van Schijndel <[email protected]>
* | Warn if blockchain majority doesn't match CBlock::CURRENT_VERSIONGavin Andresen2012-07-061-0/+18
| | | | | | | | | | | | This adds a warning "this version is obsolete, upgrade required" if more than 50 of the previous 100 blocks in the blockchain are a new version.
* | Treat non-version-1 transactions as non-standardGavin Andresen2012-07-061-0/+3
| | | | | | | | | | | | Adds CBlock::CURRENT_VERSION and CTransaction::CURRENT_VERSION constants, and makes non-CURRENT_VERSION transactions nonstandard. This will help make future upgrades smoother.
* | Merge pull request #1304 from rebroad/ShowBlockTimestampJeff Garzik2012-07-051-3/+10
|\ \ | | | | | | Show block timestamp
| * | Show the timestamp for the block.R E Broadley2012-05-291-3/+10
| | | | | | | | | | | | wrap lines
* | | CTxMemPool: eliminate redundant lock, GetHash() callJeff Garzik2012-07-041-4/+2
| | | | | | | | | | | | | | | ::addUnchecked()'s only caller already takes the necessary lock, and has already calculated the TX's hash.
* | | Remove duplicate GetHash() in ConnectBlockMatt Corallo2012-07-041-14/+14
| | |
* | | Merge pull request #1511 from jgarzik/quieten2Jeff Garzik2012-06-271-1/+5
|\ \ \ | | | | | | | | Quieten 'getdata' P2P message output
| * | | Quieten 'getdata' P2P message outputJeff Garzik2012-06-231-1/+5
| | | | | | | | | | | | | | | | Output one message per getdata, not one message per 'inv' entry.