bitcoin/src/interfaces
Ava Chow 27e89bc2f5
Merge bitcoin/bitcoin#26619: log: expand BCLog::LogFlags (categories) to 64 bits
b31a0cd0378184b2b9eb8f4bd3120cbd32c62005 log: expand BCLog::LogFlags (categories) to 64 bits (Larry Ruane)

Pull request description:

  Increase the maximum number of logging categories from 32 to 64.

  We're currently using 29 of the 32 available logging categories (there are only 3 remaining). It would be good to increase the limit soon; the fourth PR to be merged that adds a new logging category will be blocked until something like this is done.

  This PR also adds a `TEST` category that uses the new range (`1ULL << 63`) in case there's a hidden assumption somewhere that the `BCLog::LogFlags` type is 32 bits. (Also added a test for this test category.) It also provides an example showing that the expression must be `1ULL << <shift>` for shift value 31 and beyond.

ACKs for top commit:
  achow101:
    ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005
  vasild:
    ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005
  ryanofsky:
    Code review ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005, just dropping mask_bit constant since last review. I still think
  theStack:
    Code-review ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005

Tree-SHA512: de422dbeb479848d370aed42d415f42461457ab0eda62b245dc7ff9f0e111626e7d4c0d62ff13082ec664d05fbb0db04c71eb4b6f22eb8f19198826a67c4035e
2024-09-03 16:33:49 -04:00
..
2024-07-08 11:12:01 +02:00
2024-07-08 11:12:01 +02:00
2024-06-18 18:47:51 +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.