aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
AgeCommit message (Collapse)Author
2015-04-26Merge pull request #5696Wladimir J. van der Laan
691161d Consensus: Create consensus/consensus.h with some constants (jtimon)
2015-04-22Add block pruning functionalitymrbandrews
This adds a -prune=N option to bitcoind, which if set to N>0 will enable block file pruning. When pruning is enabled, block and undo files will be deleted to try to keep total space used by those files to below the prune target (N, in MB) specified by the user, subject to some constraints: - The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP), - N must be at least 550MB (chosen as a value for the target that could reasonably be met, with some assumptions about block sizes, orphan rates, etc; see comment in main.h), - No blocks are pruned until chainActive is at least 100,000 blocks long (on mainnet; defined separately for mainnet, testnet, and regtest in chainparams as nPruneAfterHeight). This unsets NODE_NETWORK if pruning is enabled. Also included is an RPC test for pruning (pruning.py). Thanks to @rdponticelli for earlier work on this feature; this is based in part off that work.
2015-04-20Consensus: Create consensus/consensus.h with some constantsjtimon
2015-04-01Merge pull request #5900Wladimir J. van der Laan
3fcfbc8 Add a consistency check for the block chain data structures (Pieter Wuille)
2015-03-30Merge pull request #5940Wladimir J. van der Laan
0f5954c Regression test for ResendWalletTransactions (Gavin Andresen)
2015-03-27Add a consistency check for the block chain data structuresPieter Wuille
This adds a -checkblockindex (defaulting to true for regtest), which occasionally does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and mapBlocksUnlinked.
2015-03-26Merge pull request #5942Wladimir J. van der Laan
fc72020 don't trickle for whitelisted nodes (Ruben de Vries)
2015-03-26Consensus: Refactor: Decouple pow.o from chainparams.oJorge Timón
2015-03-24Regression test for ResendWalletTransactionsGavin Andresen
Adds a regression test for the wallet's ResendWalletTransactions function, which uses a new, hidden RPC command "resendwallettransactions." I refactored main's Broadcast signal so it is passed the best-block time, which let me remove a global variable shared between main.cpp and the wallet (nTimeBestReceived). I also manually tested the "rebroadcast unconfirmed every half hour or so" functionality by: 1. Running bitcoind -connect=0.0.0.0:8333 2. Creating a couple of send-to-self transactions 3. Connect to a peer using -addnode 4. Waited a while, monitoring debug.log, until I see: ```2015-03-23 18:48:10 ResendWalletTransactions: rebroadcast 2 unconfirmed transactions``` One last change: don't bother putting ResendWalletTransactions messages in debug.log unless unconfirmed transactions were actually rebroadcast.
2015-03-24Includes: Refactor: Move CValidationInterface and CMainSignals out of mainJorge Timón
2015-03-24don't trickle for whitelisted nodesRuben de Vries
2015-01-31Change "insane" to "absurd" (referring to high fees) in text strings and ↵Daira Hopwood
identifiers. Note that this will also require translation changes in Transifex for the key "A fee higher than %1 is considered an insanely high fee." which is now "A fee higher than %1 is considered an absurdly high fee." Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-20Merge pull request #5648Wladimir J. van der Laan
2ce63d3 MOVEONLY: Move struct CBlockTemplate to miner.h (from main.h) (Luke Dashjr)
2015-01-12MOVEONLY: Move struct CBlockTemplate to miner.h (from main.h)Luke Dashjr
2015-01-08Merge pull request #5589Wladimir J. van der Laan
23f3435 Rename MAX_TX_SIGOPS to MAX_STANDARD_TX_SIGOPS to match similar policy constant MAX_STANDARD_TX_SIZE (Luke Dashjr)
2015-01-05Replace GetLow64 with GetCheapHashWladimir J. van der Laan
2015-01-01Rename MAX_TX_SIGOPS to MAX_STANDARD_TX_SIGOPS to match similar policy ↵Luke Dashjr
constant MAX_STANDARD_TX_SIZE
2014-12-27MOVEONLY: CBlockUndo from main.h to undo.hjtimon
2014-12-27Decouple CBlockUndo from CDiskBlockPosjtimon
2014-12-27Decouple miner.o and txmempool.o from CTxUndojtimon
2014-12-21remove max orphan blocks config parameter since it is no longer functionalJameson Lopp
2014-12-19Added "Core" to copyright headerssandakersmann
Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-05Merge pull request #5181Wladimir J. van der Laan
afd4b94 Move CMerkleBlock and CPartialMerkleTree to their own file (Matt Corallo)
2014-12-05Move CMerkleBlock and CPartialMerkleTree to their own fileMatt Corallo
2014-12-04Merge pull request #5394Wladimir J. van der Laan
307f7d4 Report script evaluation failures in log and reject messages (Pieter Wuille)
2014-12-03Merge pull request #5306Wladimir J. van der Laan
d227011 MOVEONLY: core/ -> primitives/ (Luke Dashjr)
2014-12-03MOVEONLY: core/ -> primitives/Luke Dashjr
2014-12-02Report script evaluation failures in log and reject messagesPieter Wuille
2014-12-02Make comments in main an init doxygen compatibleMichael Ford
Fix typos where appropriate Update license/copyright
2014-11-28Merge pull request #5316Wladimir J. van der Laan
f86a24b Move `setmocktime` to hidden category (Wladimir J. van der Laan) bd9aebf Introduce a hidden category (Pieter Wuille) 0dd06b2 Delay writing block indexes in invalidate/reconsider (Pieter Wuille) 9b0a8d3 Add 'invalidateblock' and 'reconsiderblock' RPC commands. (Pieter Wuille)
2014-11-27Remove -printblock, -printblocktree, and -printblockindexPieter Wuille
2014-11-26Add 'invalidateblock' and 'reconsiderblock' RPC commands.Pieter Wuille
These can be used for testing reorganizations or for manual intervention in case of chain forks.
2014-11-24Improve chainstate/blockindex disk writing policyPieter Wuille
There are 3 pieces of data that are maintained on disk. The actual block and undo data, the block index (which can refer to positions on disk), and the chainstate (which refers to the best block hash). Earlier, there was no guarantee that blocks were written to disk before block index entries referring to them were written. This commit introduces dirty flags for block index data, and delays writing entries until the actual block data is flushed. With this stricter ordering in writes, it is now safe to not always flush after every block, so there is no need for the IsInitialBlockDownload() check there - instead we just write whenever enough time has passed or the cache size grows too large. Also updating the wallet's best known block is delayed until this is done, otherwise the wallet may end up referring to an unknown block. In addition, only do a write inside the block processing loop if necessary (because of cache size exceeded). Otherwise, move the writing to a point after processing is done, after relaying.
2014-11-18TestBlockValidity function for CBlock proposals (used by CreateNewBlock)Luke Dashjr
2014-11-18Abstract context-dependent block checking from acceptanceLuke Dashjr
2014-11-03Merge pull request #5186Wladimir J. van der Laan
771d500 minor cleanup: include orders, end comments etc. (Philip Kaufmann)
2014-11-03Merge pull request #5106Wladimir J. van der Laan
1bea2bb Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and document it (Luke Dashjr) d29a291 Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for submitblock (Luke Dashjr) f877aaa Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock, now that it no longer does the full block validity check (Luke Dashjr) 24e8896 Add CValidationInterface::BlockChecked notification (Luke Dashjr)
2014-10-31minor cleanup: include orders, end comments etc.Philip Kaufmann
- no code changes
2014-10-28Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and ↵Luke Dashjr
document it
2014-10-27MOVEONLY: core.o -> core/block.ojtimon
2014-10-27MOVEONLY: separate CTxUndo out of corejtimon
2014-10-27MOVEONLY: Separate CTransaction and dependencies from corejtimon
2014-10-27MOVEONLY: Move CFeeRate and Amount constants to amount.ojtimon
2014-10-22Merge pull request #4981Wladimir J. van der Laan
85c579e script: add a slew of includes all around and drop includes from script.h (Cory Fields) db8eb54 script: move ToString and ValueString out of the header (Cory Fields) e9ca428 script: add ToByteVector() for converting anything with begin/end (Cory Fields) 066e2a1 script: move CScriptID to standard.h and add a ctor for creating them from CScripts (Cory Fields)
2014-10-21Add CValidationInterface::BlockChecked notificationLuke Dashjr
2014-10-20Rename CWalletInterface to CValidationInterfacePieter Wuille
It's useful for much more than wallets.
2014-10-17script: add a slew of includes all around and drop includes from script.hCory Fields
Lots of files ended up with indirect includes from script.h.
2014-10-14RPC additions after headers-firstPieter Wuille
2014-10-14Headers-first synchronizationPieter Wuille
Many changes: * Do not use 'getblocks', but 'getheaders', and use it to build a headers tree. * Blocks are fetched in parallel from all available outbound peers, using a limited moving window. When one peer stalls the movement of the window, it is disconnected. * No more orphan blocks. At all. We only ever request a block for which we have verified the headers, and store it to disk immediately. This means that a disk-fill attack would require PoW. * Require protocol version 31800 for every peer (released in december 2010). * No more syncnode (we sync from everyone we can, though limited to 1 during initial *headers* sync). * Introduce some extra named constants, comments and asserts.
2014-10-06Merge pull request #5036Wladimir J. van der Laan
eb6b3b2 Update English translation (Wladimir J. van der Laan) b9b2e3f Don't translate state.Abort() messages (Wladimir J. van der Laan)