bitcoin/src/interfaces
Ryan Ofsky a95a8ba3a3
Merge bitcoin/bitcoin#31197: refactor: mining interface 30955 followups
f86678156a3d3ce6488b383a2d6d91d28fcd2b73 Check leaves size maximum in MerkleComputation (Sjors Provoost)
4d572882463b20818fcfbd0a2f6fa6c0168e4e4a refactor: use CTransactionRef in submitSolution (Sjors Provoost)
2e81791d907288c174aa05dc1b3816e6d988127c Drop TransactionMerklePath default position arg (Sjors Provoost)
39d3b538e6a2af8db85077e958970cdcd0ee7f7d Rename merkle branch to path (Sjors Provoost)

Pull request description:

  This PR implements the refactors suggested in https://github.com/bitcoin/bitcoin/pull/30955#pullrequestreview-2354931253.

ACKs for top commit:
  tdb3:
    code review re-ACK f86678156a3d3ce6488b383a2d6d91d28fcd2b73
  itornaza:
    re ACK f86678156a3d3ce6488b383a2d6d91d28fcd2b73
  ryanofsky:
    Code review ACK f86678156a3d3ce6488b383a2d6d91d28fcd2b73 only changes since last review are a whitespace change and adding an Assume statement to check for size_t -> uint32_t overflows

Tree-SHA512: 661b5d5d0e24b2269bf33ab1484e37c36e67b32a7796d77ca3b1856d3043378b081ad43c32a8638b46fa8c0de51c823fd9747dd9fc81f958f20d327bf330a47c
2024-12-17 12:32:45 -05:00
..
2024-07-08 11:12:01 +02:00
2024-07-08 11:12:01 +02:00
2024-09-17 09:14:15 +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 #19160.

  • Ipc — used by multiprocess code to access Init interface across processes. Added in #19160.

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.