diff --git a/src/minerfund.cpp b/src/minerfund.cpp index c638c5c3f..bbc3015b6 100644 --- a/src/minerfund.cpp +++ b/src/minerfund.cpp @@ -1,60 +1,60 @@ // Copyright (c) 2020 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include #include #include // For DecodeDestination #include /** * Percentage of the block reward to be sent to the fund. */ static constexpr int MINER_FUND_RATIO = 8; Amount GetMinerFundAmount(const Amount &coinbaseValue) { return MINER_FUND_RATIO * coinbaseValue / 100; } static CTxDestination BuildDestination(const std::string &dest) { const auto mainNetParams = CreateChainParams(CBaseChainParams::MAIN); return DecodeDestination(dest, *mainNetParams); } static const CTxDestination & GetMinerFundDestination(const bool useAxionDestination) { static const std::string ecashMinerFundAxion = "ecash:pqnqv9lt7e5vjyp0w88zf2af0l92l8rxdg2jj94l5j"; static const std::string bitcoinCashMinerFundAxion = "bitcoincash:pqnqv9lt7e5vjyp0w88zf2af0l92l8rxdgnlxww9j9"; static CTxDestination destAxion = BuildDestination( gArgs.GetBoolArg("-ecash", DEFAULT_ECASH) ? ecashMinerFundAxion : bitcoinCashMinerFundAxion); static const std::string ecashMinerFund = "ecash:prfhcnyqnl5cgrnmlfmms675w93ld7mvvqd0y8lz07"; static const std::string bitcoinCashMinerFund = "bitcoincash:prfhcnyqnl5cgrnmlfmms675w93ld7mvvq5zsvycff"; static CTxDestination dest = BuildDestination( gArgs.GetBoolArg("-ecash", DEFAULT_ECASH) ? ecashMinerFund : bitcoinCashMinerFund); return useAxionDestination ? destAxion : dest; } -std::vector +std::unordered_set GetMinerFundWhitelist(const Consensus::Params ¶ms, const CBlockIndex *pindexPrev) { if (!gArgs.GetBoolArg("-enableminerfund", params.enableMinerFund)) { return {}; } if (!IsAxionEnabled(params, pindexPrev)) { return {}; } return {GetMinerFundDestination(!IsGluonEnabled(params, pindexPrev))}; } diff --git a/src/minerfund.h b/src/minerfund.h index 72f1a7902..2c8c8056e 100644 --- a/src/minerfund.h +++ b/src/minerfund.h @@ -1,25 +1,26 @@ // Copyright (c) 2020 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_MINERFUND_H #define BITCOIN_MINERFUND_H #include #include