forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoinjoin.h
More file actions
42 lines (33 loc) · 1.43 KB
/
coinjoin.h
File metadata and controls
42 lines (33 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) 2009-2021 The Bitcoin Core developers
// Copyright (c) 2014-2025 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_WALLET_COINJOIN_H
#define BITCOIN_WALLET_COINJOIN_H
#include <consensus/amount.h>
#include <threadsafety.h>
#include <wallet/wallet.h>
// Use a macro instead of a function for conditional logging to prevent
// evaluating arguments when logging for the category is not enabled.
#define WalletCJLogPrint(wallet, ...) \
do { \
if (LogAcceptDebug(BCLog::COINJOIN)) { \
wallet->WalletLogPrintf(__VA_ARGS__); \
} \
} while (0)
namespace wallet {
class CCoinControl;
class CWallet;
class CWalletTx;
CAmount GetBalanceAnonymized(const CWallet& wallet, const CCoinControl& coinControl);
CAmount CachedTxGetAnonymizedCredit(const CWallet& wallet, const CWalletTx& wtx, const CCoinControl& coinControl)
EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);
struct CoinJoinCredits {
CAmount m_anonymized{0};
CAmount m_denominated{0};
bool is_unconfirmed{false};
};
CoinJoinCredits CachedTxGetAvailableCoinJoinCredits(const CWallet& wallet, const CWalletTx& wtx)
EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);
} // namespace wallet
#endif // BITCOIN_WALLET_COINJOIN_H