bitcoin/src/interfaces
merge-script dfb7d58108
Merge bitcoin/bitcoin#31897: mining: drop unused -nFees and sigops from CBlockTemplate
226d81f8b708ea1c3a39ec58446e291fe7440fdd mining: drop unused -nFees and sigops from CBlockTemplate (Sjors Provoost)
53ad845fb9ebb4da39f7d55415d69647600478e5 test: check fees and sigops in getblocktemplate (Sjors Provoost)

Pull request description:

  For the coinbase `vTxFees` used a dummy value of -nFees.

  Similarly the first `vTxSigOpsCost` entry was calculated from
  the dummy coinbase transaction.

  This was introduced in #2115, but the values were never returned by the RPC or used in a test.

  Drop 'm and add code comments to prevent confusion.

  This PR also adds test coverage for the `fees` and `sigops` fields in `getblocktemplate`, so it closes #32053.

ACKs for top commit:
  ismaelsadeeq:
    re-ACK 226d81f8b708ea1c3a39ec58446e291fe7440fdd
  ryanofsky:
    Code review ACK 226d81f8b708ea1c3a39ec58446e291fe7440fdd. New test was added since last review, which seems very cleanly written and fixes some missing coverage.
  glozow:
    ACK 226d81f8b708ea1c3a39ec58446e291fe7440fdd

Tree-SHA512: 79c534e6bc4810d29114b04dd6db798877732cb473e773bf3cc28f83d14ee3982392587bd0baa39857bd53a79eae3b730d7a7029b08a9b6c3b5c51f86657ca5d
2025-03-25 08:41:59 -04:00
..
2024-07-08 11:12:01 +02:00
2024-07-08 11:12:01 +02:00
2024-10-29 11:58:51 -04: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.