aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Truncate oversize 'tx' messages before relaying/storing.Peter Todd2013-06-251-0/+10
|/ / | | | | | | Fixes a memory exhaustion attack on low-memory peers.
* | Pulled AcceptBlock out of CBlock.Eric Lombrozo2013-06-231-16/+16
| |
* | Pulled CheckBlock out of CBlock.Eric Lombrozo2013-06-231-17/+17
| |
* | Pulled AddToBlockIndex out of CBlock.Eric Lombrozo2013-06-231-8/+8
| |
* | Pulled ConnectBlock out of CBlock.Eric Lombrozo2013-06-231-19/+19
| |
* | Pulled DisconnectBlock out of CBlock.Eric Lombrozo2013-06-231-6/+6
| |
* | Moved ReadBlockFromDisk implementation to main.cppEric Lombrozo2013-06-231-0/+24
| |
* | Moved CBlock::ReadFromDisk out of CBlock to functions ReadBlockFromDisk in ↵Eric Lombrozo2013-06-231-14/+14
| | | | | | | | main.h
* | Moved WriteBlockToDisk implementation from main.h to main.cppEric Lombrozo2013-06-231-0/+26
| |
* | Moved CBlock::WriteToDisk out of CBlock to inline function WriteBlockToDisk ↵Eric Lombrozo2013-06-231-2/+2
| | | | | | | | in main.h
* | Merge pull request #2778 from jgarzik/rpc-verifydbJeff Garzik2013-06-221-4/+3
|\ \ | |/ |/| RPC: add 'verifychain' to verify chain database at runtime
| * RPC: add 'verifychain', to verify chain database at runtimeJeff Garzik2013-06-191-1/+1
| |
| * Pass check level, check depth to VerifyDB()Jeff Garzik2013-06-191-3/+2
| |
* | Merge pull request #2660 from TheBlueMatt/gmfrefactorPieter Wuille2013-06-221-26/+11
|\ \ | | | | | | Refactor fee rules to make them actually readable.
| * | Refactor fee rules to make them actually readable.Matt Corallo2013-06-141-26/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | This (nearly) doesn't change fee rules at all: * To make it into the fee transaction area, the dPriority comparison changed from < to <= * We now just ignore transactions > MAX_BLOCK_SIZE/4 instead of doing some calculations to require increasingly large fees as size increases.
* | | Introduce a CChainParameters singleton class and regtest mode.Mike Hearn2013-06-191-94/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
* | | Move implementation of some CBlockLocator methodsMike Hearn2013-06-191-2/+88
| |/ |/| | | | | | | Move out of main.h to improve compile times and add documentation for what the methods do.
* | Remove broken option to skip input checking for wallet txn.Matt Corallo2013-06-131-10/+9
|/
* Using boost::signals2 to message main from net.cpp.Eric Lombrozo2013-06-051-0/+15
|
* Moved UpdateTime out of CBlockHeader and moved CBlockHeader into core.Eric Lombrozo2013-06-051-5/+5
|
* Removed AcceptToMemoryPool method from CTransaction. This method belongs to ↵Eric Lombrozo2013-06-051-136/+140
| | | | | | | | | | | | | | | | | the mempool instance. Removed AreInputsStandard from CTransaction, made it a regular function in main. Moved CTransaction::GetOutputFor to CCoinsViewCache. Moved GetLegacySigOpCount and GetP2SHSigOpCount out of CTransaction into regular functions in main. Moved GetValueIn and HaveInputs from CTransaction into CCoinsViewCache. Moved AllowFree, ClientCheckInputs, CheckInputs, UpdateCoins, and CheckTransaction out of CTransaction and into main. Moved IsStandard and IsFinal out of CTransaction and put them in main as IsStandardTx and IsFinalTx. Moved GetValueOut out of CTransaction into main. Moved CTxIn, CTxOut, and CTransaction into core. Added minimum fee parameter to CTxOut::IsDust() temporarily until CTransaction is moved to core.h so that CTxOut needn't know about CTransaction.
* Moved CInPoint to core. Removed GetMinFee from CTransaction and made it a ↵Eric Lombrozo2013-06-051-6/+5
| | | | regular function in main.
* Moved PushGetBlocks to main.cpp to eliminate dependence of net.cpp on ↵Eric Lombrozo2013-06-051-4/+15
| | | | CBlockLocator.
* build: add global var for whether or not the gui is enabledCory Fields2013-06-041-0/+1
|
* 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