Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(coinjoin): locking improvements #682

Open
wants to merge 1 commit into
base: feat/coinjoin
Choose a base branch
from

Conversation

Syn-McJ
Copy link
Member

@Syn-McJ Syn-McJ commented Jan 31, 2025

Issue being fixed or feature implemented

Some improvements to avoid excessive locks

How Has This Been Tested?

QA

Breaking Changes

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

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@Syn-McJ Syn-McJ requested a review from pankcuf January 31, 2025 04:39
@Syn-McJ Syn-McJ self-assigned this Jan 31, 2025
@@ -39,8 +39,6 @@ final class CoinJoinMixingTxSet: GroupedTransactions, TransactionWrapper {
private let amountLock = NSLock()
private var _amount: Int64 = 0
override var amount: Int64 {
amountLock.lock()
defer { amountLock.unlock() }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read is atomic anyway

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

Successfully merging this pull request may close these issues.

1 participant