Skip to content

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Sep 8, 2025

Additional Information

Breaking Changes

None expected.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

kwvg added 26 commits September 8, 2025 13:13
The wallet should not concern itself with masternode mode state. Client
side mixing is not available for masternodes and masternodes are no
longer allowed to have the collateral in their own local wallet, drop it.
We don't initialize mn_activeman in TestingSetup so we don't need to set
`connOptions.m_active_masternode`
ActiveContext is going to host all entities are part of masternode mode
(i.e. used by a node if it is an active masternode) and is required to
separate interactive (i.e. networking-driven) portions of consensus from
portions that can be done non-interactively/offline.
Now that CCoinJoinServer is conditionally initialized, we can remove
checks that assumed its unconditional existence.
CCoinJoinClientQueueManager is conditionally initialized, we will be
deref'ing a nullptr if relay_txes is false.
We moved CCoinJoinServer to ActiveContext and 2/3 members of CJContext
are conditionally initialized, let's move the unconditionally init'ed
member out so we can conditionally initialize the whole object.
Currently a lot of non-wallet code is peppered with `ENABLE_WALLET` due
to wallet-only CoinJoin managers, we need to contain them.
This should prevent ENABLE_WALLET from spilling out to files that
include the header.
Now that we no longer assume that cj_ctx is always initialized, we can
skip the whole process if we are in masternode mode.
As it's now a fixed value, we can drop it, yay!
CJContext is no longer just a context class, it's a lot more involved
now and serves triple duty as also a notification interface and a layer
of abstraction. Name reflects that it's the wallet-specific components
of CoinJoin.
@kwvg kwvg added this to the 23 milestone Sep 8, 2025
Copy link

github-actions bot commented Sep 9, 2025

This pull request has conflicts, please rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant