bitcoin/src/interfaces
Russell Yanofsky edc316020e test: Remove duplicate NodeContext hacks
Qt tests currently are currently using two NodeContext structs at the same
time, one in interfaces::NodeImpl::m_context, and the other in
BasicTestingSetup::m_node, and the tests have hacks transferring state between
them.

Fix this by getting rid of the NodeImpl::m_context struct and making it a
pointer. This way a common BitcoinApplication object can be used for all qt
tests, but they can still have their own testing setups.

Non-test code is changing but non-test behavior is still the same as before.

Motivation for this PR is to be able to remove the
"std::move(test.m_node.connman)" and mempool hacks for swapping individual
NodeContext members in Qt tests, because followup PR #19099 adds yet another
member (wallet_client) that needs to be swapped. After this change, the whole
NodeContext struct can be swapped instead of individual members, so the
workarounds are less fragile and invasive.
2020-07-13 04:34:27 -04:00
..
chain.cpp scripted-diff: Move ui_interface to the node lib 2020-06-27 11:49:28 -04:00
chain.h wallet: Pass unused args to StartWallets 2020-07-09 13:07:37 +02:00
handler.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
handler.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
node.cpp test: Remove duplicate NodeContext hacks 2020-07-13 04:34:27 -04:00
node.h test: Remove duplicate NodeContext hacks 2020-07-13 04:34:27 -04:00
README.md Suggested interfaces::Chain cleanups from #15288 2019-03-04 15:57:58 -05:00
wallet.cpp wallet: Pass unused args to StartWallets 2020-07-09 13:07:37 +02:00
wallet.h Merge #19396: refactor: Remove confusing OutputType::CHANGE_AUTO 2020-07-02 16:10:49 +02: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.