aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2013-10-15Merge pull request #3083 from sipa/chainlocatorGavin Andresen
CBlockLocator improvements & move to core
2013-10-15replace %zu with %"PRIszu" macro to prevent compiler warningsPhilip Kaufmann
2013-10-15Reimplement CBlockLocator's chain-related logic in CChain.Pieter Wuille
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.
2013-10-14Merge pull request #3077 from sipa/chainGavin Andresen
Refactor/encapsulate chain globals into a CChain class
2013-10-13Merge pull request #2937Pieter Wuille
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)
2013-10-11Refactor/encapsulate chain globals into a CChain classPieter Wuille
2013-10-07style-police: fixed badly readable code in ProcessMessage()Philip Kaufmann
- I introduced the problem and fixed it with better readable code
2013-10-04Added ping time measurement.Josh Lehan
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.
2013-10-04special case DoS value == 0 in ProcessMessage()Philip Kaufmann
- prevents unneeded log messages, which could make users think something bad was happening
2013-10-03Merge pull request #2947 from gmaxwell/theyre_maturing_faster_these_daysGavin Andresen
[wallet] Consider generated coins mature at COINBASE_MATURITY+1
2013-09-25internal miner: move 2 globals from main to minerPhilip Kaufmann
- 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
2013-09-24Skip unspendable outputs in consistency checkPieter Wuille
2013-09-22Merge pull request #2949 from gmaxwell/fewer_fee_footgunsGavin Andresen
[raw] reject insanely high fees by default in sendrawtransaction
2013-09-18Replace printf with LogPrintf / LogPrintGavin Andresen
2013-09-10Merge pull request #2982 from gmaxwell/20130908_ccoins_corruptGregory Maxwell
Longer term workaround for chainstate corruption from negative versions.
2013-09-09fix some cosmetic glitches in the codebasePhilip Kaufmann
- 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
2013-09-09Longer term workaround for chainstate corruption from negative versions.Gregory Maxwell
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.
2013-09-03Don't warn about forks while fIsInitialDownloadMatt Corallo
2013-08-28[raw] reject insanely high fees by default in sendrawtransactionGregory Maxwell
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.
2013-08-28[wallet] Consider generated coins mature at COINBASE_MATURITY+1Gregory Maxwell
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.
2013-08-24Fix out-of-bounds checkPieter Wuille
2013-08-20Update the bloom state on the real object, not the temporary one.Gregory Maxwell
This resulted in just passing all transactions to filtered wallets which worked surprisingly well, except where it didn't.
2013-08-20Performance optimization for bloom filters.Gregory Maxwell
This reduces a peer's ability to attack network resources by using a full bloom filter, but without reducing the usability of bloom filters. It sets a default match everything filter for peers and it generalizes a prior optimization to cover more cases.
2013-08-15Mempool consistency checkPieter Wuille
2013-08-15Fix non-standard disconnected transactions causing mempool orphansPieter Wuille
2013-08-12Merge pull request #2658 from TheBlueMatt/forkalertGavin Andresen
Detect any sufficiently long fork and alert the user just like any other alert
2013-08-10do not call BuildMerkleTree() unnecessarily twiceCozz Lovan
2013-08-06Merge pull request #2871 from gavinandresen/simplify_maporphanGavin Andresen
Simplify storage of orphan transactions, fix CVE-2013-4627
2013-08-05Merge pull request #2851 from TheBlueMatt/masterGavin Andresen
Prepare for mempool testing in pull-tester and fix multi-block transaction resurrection
2013-08-02Simplify storage of orphan transactionsGavin Andresen
Orphan transactions were stored as a CDataStream pointer; this changes the mapOrphanTransactions data structures to store orphans as a CTransaction. This also fixes CVE-2013-4627 by always re-serializing transactions before relaying them.
2013-08-02Revert "Truncate oversize 'tx' messages before relaying/storing."Gavin Andresen
This reverts commit c40a5aaaf484855a4350fd702e8e72fd21a68155.
2013-07-31Move internal miner/block creation to separate miner.cpp module.Jeff Garzik
Public functions referenced elsewhere are added to miner.h.
2013-07-31Minor miner fixes (hey hey it's fun to say)Jeff Garzik
* Fix UpdateCoins() definition in main.h * Remove pwalletMain reference from BitcoinMiner(), as it is passed a wallet argument.
2013-07-31Remove #define loop from util.hGavin Andresen
Replace the loop macro with while (true). The #define caused problems for Qt.
2013-07-23Fix multi-block reorg transaction resurrectionMatt Corallo
2013-07-23Don't use checkpoints and accept nonstd txn on -regtestMatt Corallo
2013-07-22Better warning/"alert" messages for large-work forks.Matt Corallo
2013-07-22Call the -alertnotify script when we see a long or invalid fork.Matt Corallo
2013-07-22Detect any sufficiently long fork and add a warning.Matt Corallo
Such a fork is defined as being at least 7 blocks long and having a tip which is within 72 blocks of our best block.
2013-07-10Merge pull request #2743 from jgarzik/reject-reasonJeff Garzik
Log reason for non-standard transaction rejection
2013-06-25Merge pull request #2209 from CodeShark/WalletRegistrationLocksPieter Wuille
Wallet registration locks in main.cpp + UnregisterAllWallet() function
2013-06-25Merge pull request #2792 from sipa/coreimplJeff Garzik
Move core implementations to core.cpp
2013-06-25Truncate oversize 'tx' messages before relaying/storing.Peter Todd
Fixes a memory exhaustion attack on low-memory peers.
2013-06-25Move core implementations to core.cppPieter Wuille
2013-06-24Added locks on the setpwalletRegistered functions in main.cpp and added an ↵Eric Lombrozo
UnregisterAllWallets function.
2013-06-23Pulled AcceptBlock out of CBlock.Eric Lombrozo
2013-06-23Pulled CheckBlock out of CBlock.Eric Lombrozo
2013-06-23Pulled AddToBlockIndex out of CBlock.Eric Lombrozo
2013-06-23Pulled ConnectBlock out of CBlock.Eric Lombrozo
2013-06-23Pulled DisconnectBlock out of CBlock.Eric Lombrozo