aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #5367Wladimir J. van der Laan2014-12-111-16/+15
|\ \ \ | | | | | | | | | | | | 63d1ae5 Do all block index writes in a batch (Pieter Wuille)
| * | | Do all block index writes in a batchPieter Wuille2014-11-251-16/+15
| | | |
* | | | Remove txn which are invalidated by coinbase maturity during reorgMatt Corallo2014-12-081-0/+1
| | | |
* | | | Remove coinbase-dependant transactions during reorg.Matt Corallo2014-12-081-3/+2
| |_|/ |/| | | | | | | | | | | | | | This still leaves transactions in mempool that are potentially invalid if the maturity period has been reorged out of, but at least they're not missing inputs entirely.
* | | Merge pull request #5181Wladimir J. van der Laan2014-12-051-153/+1
|\ \ \ | | | | | | | | | | | | afd4b94 Move CMerkleBlock and CPartialMerkleTree to their own file (Matt Corallo)
| * | | Move CMerkleBlock and CPartialMerkleTree to their own fileMatt Corallo2014-12-051-153/+1
| | | |
* | | | Merge pull request #5308Wladimir J. van der Laan2014-12-051-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | 60d1ecd change nSubsidy's type from int64_t to CAmount (HarryWu)
| * | | | change nSubsidy's type from int64_t to CAmountHarryWu2014-11-191-1/+1
| | | | |
* | | | | Merge pull request #5394Wladimir J. van der Laan2014-12-041-9/+10
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | 307f7d4 Report script evaluation failures in log and reject messages (Pieter Wuille)
| * | | | Report script evaluation failures in log and reject messagesPieter Wuille2014-12-021-9/+10
| | | | |
* | | | | Make comments in main an init doxygen compatibleMichael Ford2014-12-021-67/+82
|/ / / / | | | | | | | | | | | | | | | | Fix typos where appropriate Update license/copyright
* | | | Merge pull request #5316Wladimir J. van der Laan2014-11-281-0/+67
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | | Delay writing block indexes in invalidate/reconsiderPieter Wuille2014-11-261-12/+6
| | | | |
| * | | | Add 'invalidateblock' and 'reconsiderblock' RPC commands.Pieter Wuille2014-11-261-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | These can be used for testing reorganizations or for manual intervention in case of chain forks.
* | | | | Remove -printblock, -printblocktree, and -printblockindexPieter Wuille2014-11-271-69/+0
|/ / / /
* | | | Merge pull request #5158Wladimir J. van der Laan2014-11-261-9/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 9ec75c5 Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true. (Ruben Dario Ponticelli) a2d0fc6 Fix IsInitialBlockDownload which was broken by headers first. (Ruben Dario Ponticelli)
| * | | | Add a locking mechanism to IsInitialBlockDownload to ensure it never goes ↵Ruben Dario Ponticelli2014-11-071-1/+7
| | | | | | | | | | | | | | | | | | | | from false to true.
| * | | | Fix IsInitialBlockDownload which was broken by headers first.Ruben Dario Ponticelli2014-10-281-9/+2
| | | | |
* | | | | Merge pull request #5321Wladimir J. van der Laan2014-11-261-9/+16
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | 34559c7 Make PruneBlockIndexCandidates safer (Pieter Wuille) cca48f6 Reset setBlockIndexCandidates once block index db loaded (21E14)
| * | | | Make PruneBlockIndexCandidates saferPieter Wuille2014-11-201-3/+3
| | | | |
| * | | | Reset setBlockIndexCandidates once block index db loaded21E142014-11-121-7/+14
| |/ / /
* | | | Merge pull request #5241Wladimir J. van der Laan2014-11-251-46/+67
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | a206950 Introduce separate flushing modes (Pieter Wuille) 51ce901 Improve chainstate/blockindex disk writing policy (Pieter Wuille)
| * | | | Introduce separate flushing modesPieter Wuille2014-11-241-9/+16
| | | | |
| * | | | Improve chainstate/blockindex disk writing policyPieter Wuille2014-11-241-46/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #5154Wladimir J. van der Laan2014-11-241-2/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | 730b1ed Check pindexBestForkBase for null (21E14)
| * | | | Check pindexBestForkBase for null21E142014-11-221-2/+2
| | | | |
* | | | | Merge pull request #1816Wladimir J. van der Laan2014-11-241-54/+96
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b867e40 CreateNewBlock: Stick height in coinbase so we pass template sanity check (Luke Dashjr) 60755db submitblock: Check for duplicate submissions explicitly (Luke Dashjr) bc6cb41 QA RPC tests: Add tests block block proposals (Luke Dashjr) 9765a50 Implement BIP 23 Block Proposal (Luke Dashjr) 3dcbb9b Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock (Luke Dashjr) 132ea9b miner_tests: Disable checkpoints so they don't fail the subsidy-change test (Luke Dashjr) df08a62 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) (Luke Dashjr) 4ea1be7 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock (Luke Dashjr) a48f2d6 Abstract context-dependent block checking from acceptance (Luke Dashjr)
| * | | | | TestBlockValidity function for CBlock proposals (used by CreateNewBlock)Luke Dashjr2014-11-181-1/+25
| | | | | |
| * | | | | Abstract context-dependent block checking from acceptanceLuke Dashjr2014-11-181-53/+71
| | | | | |
* | | | | | Prioritize and display -testsafemode status in UIdexX72014-11-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like in a real world situation, a safe mode test should also be visible in the UI. A test of safe mode is furthermore mostly relevant for developers, so it should not be overwritten by a warning about a pre-release test build.
* | | | | | Merge pull request #5170Wladimir J. van der Laan2014-11-211-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 092b58d CBlockIndex::GetBlockWork() + GetProofIncrement(nBits) -> GetBlockProof(CBlockIndex) (jtimon) 22c4272 MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include main.h -> chain.h) (jtimon)
| * | | | | | CBlockIndex::GetBlockWork() + GetProofIncrement(nBits) -> ↵jtimon2014-10-291-4/+4
| | |_|/ / / | |/| | | | | | | | | | | | | | | | GetBlockProof(CBlockIndex)
* | | | | | Check block header before accepting it.Daniel Kraft2014-11-201-0/+5
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | Previously, AcceptBlockHeader did not check the header (in particular PoW). This made the client accept invalid-PoW-headers from peers in headers-first sync.
* | | | | Merge pull request #5161Wladimir J. van der Laan2014-11-121-21/+20
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | 845c86d Do not use third party services for IP detection. (Gregory Maxwell)
| * | | | Do not use third party services for IP detection.Gregory Maxwell2014-11-071-21/+20
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a simplified re-do of closed pull #3088. This patch eliminates the privacy and reliability problematic use of centralized web services for discovering the node's addresses for advertisement. The Bitcoin protocol already allows your peers to tell you what IP they think you have, but this data isn't trustworthy since they could lie. So the challenge is using it without creating a DOS vector. To accomplish this we adopt an approach similar to the one used by P2Pool: If we're announcing and don't have a better address discovered (e.g. via UPNP) or configured we just announce to each peer the address that peer told us. Since peers could already replace, forge, or drop our address messages this cannot create a new vulnerability... but if even one of our peers is giving us a good address we'll eventually make a useful advertisement. We also may randomly use the peer-provided address for the daily rebroadcast even if we otherwise have a seemingly routable address, just in case we've been misconfigured (e.g. by UPNP). To avoid privacy problems, we only do these things if discovery is enabled.
* | | | Merge pull request #5173Wladimir J. van der Laan2014-11-051-3/+7
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | 50b43fd Be a bit more verbose during -loadblock if we already have blocks (Matt Corallo) 8375e22 Fix -loadblock after shutdown during IBD (Matt Corallo) 4ead850 Fix for crash during block download (Matt Corallo)
| * | | Be a bit more verbose during -loadblock if we already have blocksMatt Corallo2014-10-291-0/+2
| | | |
| * | | Fix -loadblock after shutdown during IBDMatt Corallo2014-10-291-1/+1
| | | |
| * | | Fix for crash during block downloadMatt Corallo2014-10-291-2/+4
| |/ /
* | | Merge pull request #5157Wladimir J. van der Laan2014-11-031-1/+19
|\ \ \ | | | | | | | | | | | | b4ee0bd Introduce preferred download peers (Pieter Wuille)
| * | | Introduce preferred download peersPieter Wuille2014-10-291-1/+19
| |/ /
* | | Merge pull request #5106Wladimir J. van der Laan2014-11-031-8/+15
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 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)
| * | Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and ↵Luke Dashjr2014-10-281-7/+7
| | | | | | | | | | | | document it
| * | Add CValidationInterface::BlockChecked notificationLuke Dashjr2014-10-211-1/+8
| | |
* | | Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)Pieter Wuille2014-10-251-4/+0
| |/ |/| | | | | | | Also use the new flag as a standard rule, and replace the IsCanonicalPush standardness check with it (as it is more complete).
* | Merge pull request #4988Wladimir J. van der Laan2014-10-221-38/+40
|\ \ | | | | | | | | | | | | 7b2bb96 Replace some function names with __func__ (Pieter Wuille) ed6d1a2 Keep information about all block files in memory (Pieter Wuille)
| * | Replace some function names with __func__Pieter Wuille2014-10-211-2/+2
| | |
| * | Keep information about all block files in memoryPieter Wuille2014-10-061-37/+39
| | |
* | | Merge pull request #5108Wladimir J. van der Laan2014-10-221-12/+12
|\ \ \ | |_|/ |/| | | | | | | | a873823 CAutoFile: Explicit Get() and remove unused methods (Wladimir J. van der Laan) fef24ca Add IsNull() to class CAutoFile and remove operator ! (Ruben Dario Ponticeli)
| * | CAutoFile: Explicit Get() and remove unused methodsWladimir J. van der Laan2014-10-221-8/+8
| | | | | | | | | | | | Also add documentation to some methods.