This PR is not based on anything other than master
.
We #include
LevelDB headers in dbwrapper.h
, which means that anything that #include
’s or transitively #include
’s dbwrapper.h
will also pull in the LevelDB headers:
This PR’s changes allow us to remove these LevelDB header #include
’s in dbwrapper.h
and have them be in dbwrapper.cpp
instead. We achieve this mainly by:
- Using private non-virtual interfaces (private
doFoo
’s) to:- Move
LevelDB
-specific code out of the header, - While keeping templatized serialization logic in the header
- Move
- Using the pimpl idiom to move
LevelDB
-specific member variables out of the header
Coincidentally, this PR also makes obfuscation an implementation detail of the database, as described in this code comment: