:: [Libbitcoin] Reorganization
Página Principal
Delete this message
Reply to this message
Autor: William Swanson
Data:  
Para: libbitcoin@lists.dyne.org
Assunto: [Libbitcoin] Reorganization
Hello,
I just submitted a big pull request
(https://github.com/libbitcoin/libbitcoin/pull/136) which moves some
things around. It doesn't change any actual code, though, just file
locations. Here is what I was thinking when I did the reorganization:

bitcoin/ - Core blockchain consensus types & library configuration.
bitcoin/utility/ - Generic things that might be useful to any project.
Nothing in here should be Bitcoin-specifc.
bitcoin/math/ - Math and crypto stuff used by Bitcoin.
bitcoin/network/ - Satoshi p2p protocol.
bitcoin/wallet/ - Data formats related to Bitcoin, but not part of the
blockchain.

The goal is to achieve the following dependency graph:

bitcoin/utility/ depends on nobody
bitcoin/math/ depends only on utility
bitcoin/ depends only on utility and math
nobody depends on bitcoin/network/
nobody depends on bitcoin/wallet/

Things are almost there. There are just a few files in utility (format
and serialize) that refer to blockchain types from the top level. With
the dependencies cleaned up, there are a lot fewer cases where
changing one header forces a recompile of the entire library.

The worst offender in terms of recompile-the-world used to be
types.hpp, but that file is completely gone now. It's contents have
been split between utility/data.hpp, math/hash.hpp, and
network/network.hpp.

Thanks to these dependency cleanups, the build time has gone down from
3 minutes to around 2 1/2 minutes on my box. The compiler spends a lot
less time parsing unneeded header files.

-William