Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 1.23 KB

appendix.adoc

File metadata and controls

47 lines (37 loc) · 1.23 KB

Appendix

PIMPL technique

The Bitcoin Core codebase contains many classes of the form class *Impl. These classes are taking advantage of the Pointer to Implementation technique which helps to both provide more stable ABIs and also to reduce compile-time dependencies.

Some of the current Bitcoin Core PIMPL classes
AddrManImpl
ChainImpl
NodeImpl
PeerManagerImpl
WalletImpl

FieldImpl
DBImpl
ExternalSignerImpl
NotificationsHandlerImpl
RPCHandlerImpl
IpcImpl
ProcessImpl
RPCMethodImpl
SketchImpl
DescriptorImpl

Amiti Uttarwar hosted a PR review club "Pimpl AddrMan to abstract implementation details" which contains information on the design aims, advantages and disadvantages. Below are copies of the annotated pictures she created and included to assist learning.

pimpl peerman amiti
Figure 1. PIMPL peerman
pimpl txrequest amiti
Figure 2. PIMPL txrequest
compilation firewall amiti
Figure 3. Compilation firewall