Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

masternode-payments.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2019 The Dash Core developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef MASTERNODE_PAYMENTS_H
6 #define MASTERNODE_PAYMENTS_H
7 
8 #include <util.h>
9 #include <core_io.h>
10 #include <key.h>
11 #include <net_processing.h>
12 #include <utilstrencodings.h>
13 
14 #include <evo/deterministicmns.h>
15 
17 
19 bool IsBlockValueValid(const CBlock& block, int nBlockHeight, CAmount blockReward, std::string& strErrorRet);
20 bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight, CAmount blockReward);
21 void FillBlockPayments(CMutableTransaction& txNew, int nBlockHeight, CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet, std::vector<CTxOut>& voutSuperblockPaymentsRet);
22 std::map<int, std::string> GetRequiredPaymentsStrings(int nStartHeight, int nEndHeight);
23 
25 
26 //
27 // Masternode Payments Class
28 // Keeps track of who should get paid for which blocks
29 //
30 
32 {
33 public:
34  bool GetBlockTxOuts(int nBlockHeight, CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet) const;
35  bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight, CAmount blockReward) const;
36 
37  bool GetMasternodeTxOuts(int nBlockHeight, CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet) const;
38 };
39 
40 #endif
Definition: block.h:72
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
bool IsBlockPayeeValid(const CTransaction &txNew, int nBlockHeight, CAmount blockReward)
CMasternodePayments mnpayments
std::map< int, std::string > GetRequiredPaymentsStrings(int nStartHeight, int nEndHeight)
bool GetBlockTxOuts(int nBlockHeight, CAmount blockReward, std::vector< CTxOut > &voutMasternodePaymentsRet) const
bool IsBlockValueValid(const CBlock &block, int nBlockHeight, CAmount blockReward, std::string &strErrorRet)
TODO: all 4 functions do not belong here really, they should be refactored/moved somewhere (main...
A mutable version of CTransaction.
Definition: transaction.h:291
bool GetMasternodeTxOuts(int nBlockHeight, CAmount blockReward, std::vector< CTxOut > &voutMasternodePaymentsRet) const
GetMasternodeTxOuts.
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:198
bool IsTransactionValid(const CTransaction &txNew, int nBlockHeight, CAmount blockReward) const
void FillBlockPayments(CMutableTransaction &txNew, int nBlockHeight, CAmount blockReward, std::vector< CTxOut > &voutMasternodePaymentsRet, std::vector< CTxOut > &voutSuperblockPaymentsRet)
Released under the MIT license