dash/src/interfaces
PastaPastaPasta c9161e2ebf
refactor: begin to de-globalize masternodeSync (#5103)
<!--
*** Please remove the following help text before submitting: ***

Provide a general summary of your changes in the Title above

Pull requests without a rationale and clear improvement may be closed
immediately.

Please provide clear motivation for your patch and explain how it
improves
Dash Core user experience or Dash Core developer experience
significantly:

* Any test improvements or new tests that improve coverage are always
welcome.
* All other changes should have accompanying unit tests (see
`src/test/`) or
functional tests (see `test/`). Contributors should note which tests
cover
modified code. If no tests exist for a region of modified code, new
tests
  should accompany the change.
* Bug fixes are most welcome when they come with steps to reproduce or
an
explanation of the potential issue as well as reasoning for the way the
bug
  was fixed.
* Features are welcome, but might be rejected due to design or scope
issues.
If a feature is based on a lot of dependencies, contributors should
first
  consider building the system outside of Dash Core, if possible.
-->

## Issue being fixed or feature implemented
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
minimizing global uses

## What was done?
<!--- Describe your changes in detail -->
Started the deglobalization, a future PR should be done to continue this
deglobalization

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->


## Breaking Changes
<!--- Please describe any breaking changes your code introduces -->
none

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [x] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-01-04 23:37:20 +03:00
..
chain.cpp merge bitcoin#21415: remove Optional & nullopt 2022-10-20 16:08:45 -05:00
chain.h merge bitcoin#21415: remove Optional & nullopt 2022-10-20 16:08:45 -05:00
handler.cpp merge bitcoin#21404: Remove MakeUnique<T>() 2022-10-20 16:08:45 -05:00
handler.h merge bitcoin#16963: Fix unique_ptr usage in boost::signals2 2022-05-13 18:06:06 +05:30
node.cpp refactor: begin to de-globalize masternodeSync (#5103) 2023-01-04 23:37:20 +03:00
node.h merge bitcoin#19619: Remove wallet.dat path handling from wallet.cpp, rpcwallet.cpp 2022-10-17 08:03:10 +05:30
README.md Merge #15531: Suggested interfaces::Chain cleanups from #15288 2021-11-30 00:01:17 -05:00
wallet.cpp revert: revert bitcoin#15454 (Remove the automatic creation and loading of the default wallet) 2022-12-04 18:02:40 -06:00
wallet.h revert: revert bitcoin#15454 (Remove the automatic creation and loading of the default wallet) 2022-12-04 18:02:40 -06:00

Internal c++ interfaces

The following interfaces are defined here:

  • Chain — used by wallet to access blockchain and mempool state. Added in #14437, #14711, #15288, and #10973.

  • ChainClient — used by node to start & stop Chain clients. Added in #14437.

  • Node — used by GUI to start & stop bitcoin node. Added in #10244.

  • Wallet — used by GUI to access wallets. Added in #10244.

  • Handler — returned by handleEvent methods on interfaces above and used to manage lifetimes of event handlers.

  • Init — used by multiprocess code to access interfaces above on startup. Added in #10102.

The interfaces above define boundaries between major components of bitcoin code (node, wallet, and gui), making it possible for them to run in different processes, and be tested, developed, and understood independently. These interfaces are not currently designed to be stable or to be used externally.