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

fix lint #533

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/governance/governanceclasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <consensus/amount.h>
#include <governance/governance.h>
#include <script/script.h>
#include <script/script.h>
#include <threadsafety.h>
#include <uint256.h>
#include <addresstype.h>
Expand Down
4 changes: 2 additions & 2 deletions src/policy/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
/**
* Standard script verification flags that standard transactions will comply
* with. However we do not ban/disconnect nodes that forward txs violating
* these rules, for better forwards and backwards compatability.
* these rules, for better forwards and backwards compatibility.
*/
static constexpr unsigned int STANDARD_SCRIPT_VERIFY_FLAGS{MANDATORY_SCRIPT_VERIFY_FLAGS |
SCRIPT_VERIFY_DERSIG |
Expand Down Expand Up @@ -133,7 +133,7 @@ bool IsStandard(const CScript& scriptPubKey, const std::optional<unsigned>& max_
static constexpr decltype(CTransaction::nVersion) TX_MAX_STANDARD_VERSION{2};
// SYSCOIN consensus is driven by version, the highest version is SYSCOIN_TX_VERSION_NEVM_DATA_SHA3(137)
static constexpr decltype(CTransaction::nVersion) TX_MAX_SYSCOIN_STANDARD_VERSION{137};


/**
* Check for standard transaction types
Expand Down
17 changes: 8 additions & 9 deletions src/primitives/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#include <script/script.h>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
Expand Down Expand Up @@ -170,7 +169,7 @@ bool IsMasternodeTx(const int &nVersion) {
return nVersion == SYSCOIN_TX_VERSION_MN_COINBASE ||
nVersion == SYSCOIN_TX_VERSION_MN_QUORUM_COMMITMENT ||
nVersion == SYSCOIN_TX_VERSION_MN_REGISTER ||
nVersion == SYSCOIN_TX_VERSION_MN_UPDATE_SERVICE ||
nVersion == SYSCOIN_TX_VERSION_MN_UPDATE_SERVICE ||
nVersion == SYSCOIN_TX_VERSION_MN_UPDATE_REGISTRAR ||
nVersion == SYSCOIN_TX_VERSION_MN_UPDATE_REVOKE;
}
Expand Down Expand Up @@ -251,7 +250,7 @@ int CMintSyscoin::UnserializeFromData(const std::vector<unsigned char> &vchData)
} catch (std::exception &e) {
SetNull();
}

return -1;
}

Expand All @@ -264,7 +263,7 @@ bool CMintSyscoin::UnserializeFromTx(const CTransaction &tx) {
return false;
}
if(UnserializeFromData(vchData) != 0)
{
{
SetNull();
return false;
}
Expand All @@ -279,10 +278,10 @@ bool CMintSyscoin::UnserializeFromTx(const CMutableTransaction &mtx) {
return false;
}
if(UnserializeFromData(vchData) != 0)
{
{
SetNull();
return false;
}
}
return true;
}
CNEVMData::CNEVMData(const CTransaction &tx, const int nVersion) {
Expand Down Expand Up @@ -322,7 +321,7 @@ bool CNEVMData::UnserializeFromTx(const CTransaction &tx, const int nVersion) {
return false;
}
if(UnserializeFromData(vchData, nVersion) != 0)
{
{
SetNull();
return false;
}
Expand All @@ -332,7 +331,7 @@ bool CNEVMData::UnserializeFromTx(const CTransaction &tx, const int nVersion) {
// avoid from deleting in SetNull because vchNEVMData memory isn't owned by CNEVMData
vchNEVMData = nullptr;
SetNull();
return false;
return false;
}
}
return true;
Expand All @@ -345,7 +344,7 @@ bool CNEVMData::UnserializeFromScript(const CScript &scriptPubKey) {
return false;
}
if(UnserializeFromData(vchData, PROTOCOL_VERSION) != 0)
{
{
SetNull();
return false;
}
Expand Down
1 change: 0 additions & 1 deletion src/rpc/auxpow_miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <node/miner.h>
#include <script/script.h>
#include <script/script.h>
#include <txmempool.h>
#include <uint256.h>
#include <univalue.h>
Expand Down
6 changes: 3 additions & 3 deletions src/script/solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

// The Solver functions are used by policy and the wallet, but not consensus.

#ifndef BITCOIN_SCRIPT_SOLVER_H
#define BITCOIN_SCRIPT_SOLVER_H
#ifndef SYSCOIN_SCRIPT_SOLVER_H
#define SYSCOIN_SCRIPT_SOLVER_H

#include <attributes.h>
#include <script/script.h>
Expand Down Expand Up @@ -63,4 +63,4 @@ std::optional<std::pair<int, std::vector<Span<const unsigned char>>>> MatchMulti
/** Generate a multisig script. */
CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys);

#endif // BITCOIN_SCRIPT_SOLVER_H
#endif // SYSCOIN_SCRIPT_SOLVER_H
6 changes: 3 additions & 3 deletions src/services/nevmconsensus.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 SYSCOIN_SERVICES_SYSCOINCONSENSUS_H
#define SYSCOIN_SERVICES_SYSCOINCONSENSUS_H
#ifndef SYSCOIN_SERVICES_NEVMCONSENSUS_H
#define SYSCOIN_SERVICES_NEVMCONSENSUS_H
#include <primitives/transaction.h>
#include <dbwrapper.h>
#include <consensus/params.h>
Expand Down Expand Up @@ -57,4 +57,4 @@ extern std::unique_ptr<CNEVMDataDB> pnevmdatadb;
bool DisconnectMint(const CTransaction &tx, const uint256& txHash, NEVMMintTxMap &mapMintKeys);
bool DisconnectSyscoinTransaction(const CTransaction& tx, const uint256& txHash, const CTxUndo& txundo, CCoinsViewCache& view, NEVMMintTxMap &mapMintKeys, NEVMDataVec &NEVMDataVecOut);
bool CheckSyscoinMint(const CTransaction& tx, TxValidationState &tstate, const bool &fJustCheck, const uint32_t& nHeight, NEVMMintTxMap &mapMintKeys, CAmount &nValue);
#endif // SYSCOIN_SERVICES_SYSCOINCONSENSUS_H
#endif // SYSCOIN_SERVICES_NEVMCONSENSUS_H