forked from CoinBlack/blackcoin-more
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstaking.h
31 lines (23 loc) · 1.24 KB
/
staking.h
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
// Copyright (c) 2014-2023 The Blackcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Staking start/stop algos by Qtum
// Copyright (c) 2016-2023 The Qtum developers
#ifndef BLACKCOIN_WALLET_STAKE_H
#define BLACKCOIN_WALLET_STAKE_H
#include <wallet/spend.h>
#include <wallet/wallet.h>
namespace wallet {
/* Start staking */
void StartStake(CWallet& wallet);
/* Stop staking */
void StopStake(CWallet& wallet);
uint64_t GetStakeWeight(const CWallet& wallet);
void AvailableCoinsForStaking(const CWallet& wallet,
std::vector<std::pair<const CWalletTx*, unsigned int> >& vCoins,
const CCoinControl* coinControl = nullptr,
const CoinFilterParams& params = {}) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);
bool SelectCoinsForStaking(const CWallet& wallet, CAmount& nTargetValue, std::set<std::pair<const CWalletTx *, unsigned int> > &setCoinsRet, CAmount& nValueRet);
bool CreateCoinStake(CWallet& wallet, unsigned int nBits, int64_t nSearchInterval, CMutableTransaction& tx, CAmount& nFees, CTxDestination destination);
} // namespace wallet
#endif // BLACKCOIN_WALLET_STAKE_H