aboutsummaryrefslogtreecommitdiff
path: root/src/chain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow block announcements with headersSuhas Daftuar2015-11-291-0/+3
| | | | | | | | | | | | | | | | | | | This replaces using inv messages to announce new blocks, when a peer requests (via the new "sendheaders" message) that blocks be announced with headers instead of inv's. Since headers-first was introduced, peers send getheaders messages in response to an inv, which requires generating a block locator that is large compared to the size of the header being requested, and requires an extra round-trip before a reorg can be relayed. Save time by tracking headers that a peer is likely to know about, and send a headers chain that would connect to a peer's known headers, unless the chain would be too big, in which case we revert to sending an inv instead. Based off of @sipa's commit to announce all blocks in a reorg via inv, which has been squashed into this commit. Rebased-by: Pieter Wuille
* Reduce checkpoints' effect on consensus.Pieter Wuille2015-05-131-3/+4
| | | | | | | | | | | | | Instead of only checking height to decide whether to disable script checks, actually check whether a block is an ancestor of a checkpoint, up to which headers have been validated. This means that we don't have to prevent accepting a side branch anymore - it will be safe, just less fast to do. We still need to prevent being fed a multitude of low-difficulty headers filling up our memory. The mechanism for that is unchanged for now: once a checkpoint is reached with headers, no headers chain branching off before that point are allowed anymore.
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Move remaining CBlockIndex methods to chain.cppPieter Wuille2014-12-111-0/+49
|
* Update comments in chain to be doxygen compatibleMichael Ford2014-10-251-2/+3
|
* Chain::SetTip return type to void21E142014-10-201-3/+2
|
* cleanup license and header end comment in chain.cpp/.hPhilip Kaufmann2014-09-291-1/+1
|
* Move CBlockIndex, CChain and related code out of mainjtimon2014-09-081-0/+59