diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-06-28 18:24:32 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-06-28 18:26:41 +0200 |
| commit | d4e551adfec298d12f2147467227f07e3a94b872 (patch) | |
| tree | 38479ecf10f5bf10363d208334e25bb6271b3429 /src/net_processing.cpp | |
| parent | Merge #10690: [qa] Bugfix: allow overriding extra_args in ComparisonTestFrame... (diff) | |
| parent | [qa] Test non-atomic chainstate writes (diff) | |
| download | discoin-d4e551adfec298d12f2147467227f07e3a94b872.tar.xz discoin-d4e551adfec298d12f2147467227f07e3a94b872.zip | |
Merge #10148: Use non-atomic flushing with block replay
176c021 [qa] Test non-atomic chainstate writes (Suhas Daftuar)
d6af06d Dont create pcoinsTip until after ReplayBlocks. (Matt Corallo)
eaca1b7 Random db flush crash simulator (Pieter Wuille)
0580ee0 Adapt memory usage estimation for flushing (Pieter Wuille)
013a56a Non-atomic flushing using the blockchain as replay journal (Pieter Wuille)
b3a279c [MOVEONLY] Move LastCommonAncestor to chain (Pieter Wuille)
Tree-SHA512: 47ccc62303f9075c44d2a914be75bd6969ff881a857a2ff1227f05ec7def6f4c71c46680c5a28cb150c814999526797dc05cf2701fde1369c06169f46eccddee
Diffstat (limited to 'src/net_processing.cpp')
| -rw-r--r-- | src/net_processing.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 8fc6f6f95..4d832f371 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -452,25 +452,6 @@ bool PeerHasHeader(CNodeState *state, const CBlockIndex *pindex) return false; } -/** Find the last common ancestor two blocks have. - * Both pa and pb must be non-NULL. */ -const CBlockIndex* LastCommonAncestor(const CBlockIndex* pa, const CBlockIndex* pb) { - if (pa->nHeight > pb->nHeight) { - pa = pa->GetAncestor(pb->nHeight); - } else if (pb->nHeight > pa->nHeight) { - pb = pb->GetAncestor(pa->nHeight); - } - - while (pa != pb && pa && pb) { - pa = pa->pprev; - pb = pb->pprev; - } - - // Eventually all chain branches meet at the genesis block. - assert(pa == pb); - return pa; -} - /** Update pindexLastCommonBlock and add not-in-flight missing successors to vBlocks, until it has * at most count entries. */ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<const CBlockIndex*>& vBlocks, NodeId& nodeStaller, const Consensus::Params& consensusParams) { |