Skip to content

Conversation

@jtimon
Copy link
Contributor

@jtimon jtimon commented Feb 20, 2016

If we agree that libbitcoinconsensus should not depend on chain.o, we need some other dependency as a requirement.
This same thing could be done with a "final" almost-C-ready API instead of a CPP abstract class (and that was my initial idea), but that would be more disruptive and harder to review.

Not introducing a non-storage interface for CBlockIndex is blocking the following things:

  • Decouple pow.o from chain.o and move it to the consensus package
  • This will allow us to decouple consensus/consensus.cpp from chain.o right away (once MOVEONLY: Move consensus functions out of main #7310 or similar is merged)
  • This will allow new consensus code (for example, an implementation of bip9) to avoid depending on CBlockIndex. This will also allow to s/CBlockIndex/CBlockIndexView in small encapsulation commits while minimizing disruption.

@jtimon jtimon force-pushed the libconsensus-p2a-chain-cpp-interface-0.12.99 branch from fa669ee to bf26c10 Compare February 24, 2016 22:12
jtimon referenced this pull request in sipa/bitcoin Mar 3, 2016
Inspired by former implementations by Eric Lombrozo and Rusty Russell, and
based on code by Jorge Timon.
@jtimon jtimon closed this Mar 3, 2016
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants