Page MenuHomePhabricator

Introduce the concept of parked chain.
ClosedPublic

Authored by deadalnix on May 29 2018, 19:23.

Details

Summary

A parked chain behave pretty much like an invalid chain as far as chain selection goes, but having 2 different states will allow to reconsider parked chain in time.

Depends on D1466

Test Plan

Added test for the flag mechnery itself.

I was unable to find a proper way to test the change in FindMostWorkChain as nothign set the flag yet - so intergration test do not quite work - and the whole thing is so screwed up that unit testing is not really viable.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I'm not sure about this concept. I do not think about EBP as being a property of the block, but rather where the block lives? I.E. does your car isn't changing when you park it, it's just going into your garage. I understand right now there is a mapBlockIndex and a chainActive.

Is there any reason not to introduce a wrapper around chainActive that contains a set of CChains?

schancel requested changes to this revision.Jun 18 2018, 13:02
schancel added inline comments.
src/validation.cpp
5030 ↗(On Diff #4102)

Can I please ask you to add a doc comment about the purpose of this function? I have no idea how to evaluate if this is correct without knowing what this is supposed to do.

This revision now requires changes to proceed.Jun 18 2018, 13:02
deadalnix added inline comments.
src/validation.cpp
5030 ↗(On Diff #4102)

CheckBlockIndex : Check the index of blocks.

Does this really need a doc comment ?

src/validation.cpp
5030 ↗(On Diff #4102)

What does it mean to check the block index? I do not know, I cannot review this.

jasonbcox added a subscriber: jasonbcox.

LGTM, but +1 on adding a comment to better explain CheckBlockIndex.

This revision is now accepted and ready to land.Jul 11 2018, 22:14
This revision was automatically updated to reflect the committed changes.