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

[Cleanup] Unify header guards #2936

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions src/activemasternode.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef ACTIVEMASTERNODE_H
#define ACTIVEMASTERNODE_H
#ifndef PIVX_ACTIVEMASTERNODE_H
#define PIVX_ACTIVEMASTERNODE_H

#include "key.h"
#include "evo/deterministicmns.h"
Expand Down Expand Up @@ -117,4 +117,4 @@ bool GetActiveMasternodeKeys(CTxIn& vin, Optional<CKey>& key, CBLSSecretKey& bls
// Get active masternode BLS operator keys for DMN
bool GetActiveDMNKeys(CBLSSecretKey& key, CTxIn& vin);

#endif
#endif // PIVX_ACTIVEMASTERNODE_H
6 changes: 3 additions & 3 deletions src/addrdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_ADDRDB_H
#define BITCOIN_ADDRDB_H
#ifndef PIVX_ADDRDB_H
#define PIVX_ADDRDB_H

#include "fs.h"
#include "serialize.h"
Expand Down Expand Up @@ -94,4 +94,4 @@ class CBanDB
bool Read(banmap_t& banSet);
};

#endif //BITCOIN_ADDRDB_H
#endif // PIVX_ADDRDB_H
2 changes: 1 addition & 1 deletion src/addressbook.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ namespace AddressBook {

}

#endif //PIVX_ADDRESSBOOK_H
#endif // PIVX_ADDRESSBOOK_H
6 changes: 3 additions & 3 deletions src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_ADDRMAN_H
#define BITCOIN_ADDRMAN_H
#ifndef PIVX_ADDRMAN_H
#define PIVX_ADDRMAN_H

#if defined(HAVE_CONFIG_H)
#include "config/pivx-config.h"
Expand Down Expand Up @@ -742,4 +742,4 @@ friend class CAddrManTest;

};

#endif // BITCOIN_ADDRMAN_H
#endif // PIVX_ADDRMAN_H
2 changes: 1 addition & 1 deletion src/amount.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ typedef int64_t CAmount;
static const CAmount COIN = 100000000;
static const CAmount CENT = 1000000;

#endif // PIVX_AMOUNT_H
#endif // PIVX_AMOUNT_H
6 changes: 3 additions & 3 deletions src/arith_uint256.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_ARITH_UINT256_H
#define BITCOIN_ARITH_UINT256_H
#ifndef PIVX_ARITH_UINT256_H
#define PIVX_ARITH_UINT256_H

#include <assert.h>
#include <cstring>
Expand Down Expand Up @@ -385,4 +385,4 @@ arith_uint512 UintToArith512(const uint512 &);
const arith_uint256 ARITH_UINT256_ZERO = arith_uint256();
const arith_uint256 ARITH_UINT256_ONE = arith_uint256(1);

#endif // BITCOIN_UINT256_H
#endif // PIVX_ARITH_UINT256_H
6 changes: 3 additions & 3 deletions src/attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_ATTRIBUTES_H
#define BITCOIN_ATTRIBUTES_H
#ifndef PIVX_ATTRIBUTES_H
#define PIVX_ATTRIBUTES_H

#if defined(__has_cpp_attribute)
# if __has_cpp_attribute(nodiscard)
Expand All @@ -29,4 +29,4 @@
# define LIFETIMEBOUND
#endif

#endif // BITCOIN_ATTRIBUTES_H
#endif // PIVX_ATTRIBUTES_H
6 changes: 3 additions & 3 deletions src/base58.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* - E-mail usually won't line-break if there's no punctuation to break at.
* - Double-clicking selects the whole number as one word if it's all alphanumeric.
*/
#ifndef BITCOIN_BASE58_H
#define BITCOIN_BASE58_H
#ifndef PIVX_BASE58_H
#define PIVX_BASE58_H

#include "attributes.h"
#include "chainparams.h"
Expand Down Expand Up @@ -65,4 +65,4 @@ NODISCARD bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vc
*/
NODISCARD bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet, int max_ret_len);

#endif // BITCOIN_BASE58_H
#endif // PIVX_BASE58_H
7 changes: 4 additions & 3 deletions src/bech32.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
// 6 characters of which are a checksum.
//
// For more information, see BIP 173.
#ifndef BITCOIN_BECH32_H
#define BITCOIN_BECH32_H

#ifndef PIVX_BECH32_H
#define PIVX_BECH32_H

#include <stdint.h>
#include <string>
Expand All @@ -26,4 +27,4 @@ std::pair<std::string, std::vector<uint8_t>> Decode(const std::string& str);

} // namespace bech32

#endif // BITCOIN_BECH32_H
#endif // PIVX_BECH32_H
6 changes: 3 additions & 3 deletions src/bench/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_BENCH_BENCH_H
#define BITCOIN_BENCH_BENCH_H
#ifndef PIVX_BENCH_BENCH_H
#define PIVX_BENCH_BENCH_H

#include <chrono>
#include <functional>
Expand Down Expand Up @@ -138,4 +138,4 @@ class PlotlyPrinter : public Printer
#define BENCHMARK(n, num_iters_for_one_second) \
benchmark::BenchRunner BOOST_PP_CAT(bench_, BOOST_PP_CAT(__LINE__, n))(BOOST_PP_STRINGIZE(n), n, (num_iters_for_one_second));

#endif // BITCOIN_BENCH_BENCH_H
#endif // PIVX_BENCH_BENCH_H
6 changes: 3 additions & 3 deletions src/bench/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_BENCH_DATA_H
#define BITCOIN_BENCH_DATA_H
#ifndef PIVX_BENCH_DATA_H
#define PIVX_BENCH_DATA_H

#include <cstdint>
#include <vector>
Expand All @@ -16,4 +16,4 @@ extern const std::vector<uint8_t> block2680960;
} // namespace data
} // namespace benchmark

#endif // BITCOIN_BENCH_DATA_H
#endif // PIVX_BENCH_DATA_H
6 changes: 3 additions & 3 deletions src/bench/perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

/** Functions for measurement of CPU cycles */
#ifndef H_PERF
#define H_PERF
#ifndef PIVX_BENCH_PERF_H
#define PIVX_BENCH_PERF_H

#include <stdint.h>

Expand Down Expand Up @@ -34,4 +34,4 @@ uint64_t perf_cpucycles(void);
void perf_init(void);
void perf_fini(void);

#endif // H_PERF
#endif // PIVX_BENCH_PERF_H
6 changes: 3 additions & 3 deletions src/bip38.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_BIP38_H
#define BITCOIN_BIP38_H
#ifndef PIVX_BIP38_H
#define PIVX_BIP38_H

#include "pubkey.h"
#include "uint256.h"
Expand Down Expand Up @@ -37,4 +37,4 @@ bool BIP38_Decrypt(std::string strPassphrase, std::string strEncryptedKey, uint2

std::string AddressToBip38Hash(const std::string& address);

#endif // BIP38_H
#endif // PIVX_BIP38_H
2 changes: 1 addition & 1 deletion src/blocksignature.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ bool SignBlockWithKey(CBlock& block, const CKey& key);
bool SignBlock(CBlock& block, const CKeyStore& keystore);
bool CheckBlockSignature(const CBlock& block);

#endif //PIVX_BLOCKSIGNATURE_H
#endif // PIVX_BLOCKSIGNATURE_H
6 changes: 3 additions & 3 deletions src/bloom.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_BLOOM_H
#define BITCOIN_BLOOM_H
#ifndef PIVX_BLOOM_H
#define PIVX_BLOOM_H

#include "serialize.h"

Expand Down Expand Up @@ -131,4 +131,4 @@ class CRollingBloomFilter
int nHashFuncs;
};

#endif // BITCOIN_BLOOM_H
#endif // PIVX_BLOOM_H
6 changes: 3 additions & 3 deletions src/bls/bls_batchverifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef PIVX_CRYPTO_BLS_BATCHVERIFIER_H
#define PIVX_CRYPTO_BLS_BATCHVERIFIER_H
#ifndef PIVX_BLS_BLS_BATCHVERIFIER_H
#define PIVX_BLS_BLS_BATCHVERIFIER_H

#include "bls_worker.h"

Expand Down Expand Up @@ -237,4 +237,4 @@ class CBLSBatchVerifier
}
};

#endif // PIVX_CRYPTO_BLS_BATCHVERIFIER_H
#endif // PIVX_BLS_BLS_BATCHVERIFIER_H
6 changes: 3 additions & 3 deletions src/bls/bls_ies.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef PIVX_CRYPTO_BLS_IES_H
#define PIVX_CRYPTO_BLS_IES_H
#ifndef PIVX_BLS_BLS_IES_H
#define PIVX_BLS_BLS_IES_H

#include "bls/bls_wrapper.h"
#include "streams.h"
Expand Down Expand Up @@ -156,4 +156,4 @@ class CBLSIESMultiRecipientObjects : public CBLSIESMultiRecipientBlobs
}
};

#endif // PIVX_CRYPTO_BLS_IES_H
#endif // PIVX_BLS_BLS_IES_H
6 changes: 3 additions & 3 deletions src/bls/bls_worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef PIVX_CRYPTO_BLS_WORKER_H
#define PIVX_CRYPTO_BLS_WORKER_H
#ifndef PIVX_BLS_BLS_WORKER_H
#define PIVX_BLS_BLS_WORKER_H

#include "bls/bls_wrapper.h"
#include "ctpl_stl.h"
Expand Down Expand Up @@ -200,4 +200,4 @@ class CBLSWorkerCache
}
};

#endif // PIVX_CRYPTO_BLS_WORKER_H
#endif // PIVX_BLS_BLS_WORKER_H
6 changes: 3 additions & 3 deletions src/bls/bls_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef PIVX_CRYPTO_BLS_H
#define PIVX_CRYPTO_BLS_H
#ifndef PIVX_BLS_BLS_WRAPPER_H
#define PIVX_BLS_BLS_WRAPPER_H

#include "hash.h"
#include "serialize.h"
Expand Down Expand Up @@ -419,4 +419,4 @@ typedef std::shared_ptr<BLSSignatureVector> BLSSignatureVectorPtr;

bool BLSInit();

#endif // PIVX_CRYPTO_BLS_H
#endif // PIVX_BLS_BLS_WRAPPER_H
2 changes: 1 addition & 1 deletion src/bls/key_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ namespace bls {

} // end bls namespace

#endif //PIVX_BLS_KEY_IO_H
#endif // PIVX_BLS_KEY_IO_H
6 changes: 3 additions & 3 deletions src/budget/budgetdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BUDGET_DB_H
#define BUDGET_DB_H
#ifndef PIVX_BUDGET_BUDGETDB_H
#define PIVX_BUDGET_BUDGETDB_H

#include "budget/budgetmanager.h"
#include "fs.h"
Expand Down Expand Up @@ -36,4 +36,4 @@ class CBudgetDB
ReadResult Read(CBudgetManager& objToLoad, bool fDryRun = false);
};

#endif // BUDGET_DB_H
#endif // PIVX_BUDGET_BUDGETDB_H
6 changes: 3 additions & 3 deletions src/budget/budgetmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BUDGET_MANAGER_H
#define BUDGET_MANAGER_H
#ifndef PIVX_BUDGET_BUDGETMANAGER_H
#define PIVX_BUDGET_BUDGETMANAGER_H

#include "budget/budgetproposal.h"
#include "budget/finalizedbudget.h"
Expand Down Expand Up @@ -209,4 +209,4 @@ class CBudgetManager : public CValidationInterface

extern CBudgetManager g_budgetman;

#endif // BUDGET_MANAGER_H
#endif // PIVX_BUDGET_BUDGETMANAGER_H
6 changes: 3 additions & 3 deletions src/budget/budgetproposal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BUDGET_PROPOSAL_H
#define BUDGET_PROPOSAL_H
#ifndef PIVX_BUDGET_BUDGETPROPOSAL_H
#define PIVX_BUDGET_BUDGETPROPOSAL_H

#include "budget/budgetvote.h"
#include "net.h"
Expand Down Expand Up @@ -156,4 +156,4 @@ class CBudgetProposal

};

#endif // BUDGET_PROPOSAL_H
#endif // PIVX_BUDGET_BUDGETPROPOSAL_H
6 changes: 3 additions & 3 deletions src/budget/budgetutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php.

#ifndef PIVX_BUDGETUTIL_H
#define PIVX_BUDGETUTIL_H
#ifndef PIVX_BUDGET_BUDGETUTIL_H
#define PIVX_BUDGET_BUDGETUTIL_H

#include "uint256.h"
#include "budget/budgetvote.h"
Expand All @@ -24,4 +24,4 @@ UniValue mnLocalBudgetVoteInner(bool fLegacyMN, const uint256& budgetHash, bool
UniValue mnBudgetVoteInner(CWallet* const pwallet, bool fLegacyMN, const uint256& budgetHash, bool fFinal,
const CBudgetVote::VoteDirection& nVote, const Optional<std::string>& mnAliasFilter);

#endif //PIVX_BUDGETUTIL_H
#endif // PIVX_BUDGET_BUDGETUTIL_H
6 changes: 3 additions & 3 deletions src/budget/budgetvote.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BUDGET_VOTE_H
#define BUDGET_VOTE_H
#ifndef PIVX_BUDGET_BUDGETVOTE_H
#define PIVX_BUDGET_BUDGETVOTE_H

#include "messagesigner.h"
#include "primitives/transaction.h"
Expand Down Expand Up @@ -68,4 +68,4 @@ class CBudgetVote : public CSignedMessage
SERIALIZE_METHODS(CBudgetVote, obj) { READWRITE(obj.vin, obj.nProposalHash, Using<CustomUintFormatter<4>>(obj.nVote), obj.nTime, obj.vchSig, obj.nMessVersion); }
};

#endif // BUDGET_VOTE_H
#endif // PIVX_BUDGET_BUDGETVOTE_H
Loading
Loading