diff --git a/src/evo/assetlocktx.h b/src/evo/assetlocktx.h index 1e9a666d50..531183fd0a 100644 --- a/src/evo/assetlocktx.h +++ b/src/evo/assetlocktx.h @@ -6,9 +6,9 @@ #define BITCOIN_EVO_ASSETLOCKTX_H #include -#include +#include #include - +#include #include #include diff --git a/src/evo/cbtx.cpp b/src/evo/cbtx.cpp index 48baccd9d9..a9a5abe762 100644 --- a/src/evo/cbtx.cpp +++ b/src/evo/cbtx.cpp @@ -20,6 +20,7 @@ #include #include + bool CheckCbTx(const CTransaction& tx, const CBlockIndex* pindexPrev, TxValidationState& state) { if (tx.nType != TRANSACTION_COINBASE) { @@ -448,7 +449,7 @@ std::string CCbTx::ToString() const creditPoolBalance / COIN, creditPoolBalance % COIN); } -std::optional GetCoinbaseTx(const CBlockIndex* pindex) +std::optional> GetNonNullCoinbaseChainlock(const CBlockIndex* pindex) { if (pindex == nullptr) { return std::nullopt; @@ -464,20 +465,14 @@ std::optional GetCoinbaseTx(const CBlockIndex* pindex) return std::nullopt; } - CTransactionRef cbTx = block.vtx[0]; - return GetTxPayload(*cbTx); -} - -std::optional> GetNonNullCoinbaseChainlock(const CBlockIndex* pindex) -{ - auto opt_cbtx = GetCoinbaseTx(pindex); + const CTransactionRef cbTx = block.vtx[0]; + const auto opt_cbtx = GetTxPayload(*cbTx); if (!opt_cbtx.has_value()) { return std::nullopt; } - CCbTx& cbtx = opt_cbtx.value(); - + const CCbTx& cbtx = opt_cbtx.value(); if (cbtx.nVersion < CCbTx::Version::CLSIG_AND_BALANCE) { return std::nullopt; } diff --git a/src/evo/cbtx.h b/src/evo/cbtx.h index dccfb56212..cb8ab1f92c 100644 --- a/src/evo/cbtx.h +++ b/src/evo/cbtx.h @@ -100,7 +100,6 @@ bool CheckCbTxBestChainlock(const CBlock& block, const CBlockIndex* pindexPrev, bool CalcCbTxBestChainlock(const llmq::CChainLocksHandler& chainlock_handler, const CBlockIndex* pindexPrev, uint32_t& bestCLHeightDiff, CBLSSignature& bestCLSignature); -std::optional GetCoinbaseTx(const CBlockIndex* pindex); std::optional> GetNonNullCoinbaseChainlock(const CBlockIndex* pindex); #endif // BITCOIN_EVO_CBTX_H diff --git a/src/evo/creditpool.h b/src/evo/creditpool.h index dfb3004f8e..5da980df65 100644 --- a/src/evo/creditpool.h +++ b/src/evo/creditpool.h @@ -5,10 +5,7 @@ #ifndef BITCOIN_EVO_CREDITPOOL_H #define BITCOIN_EVO_CREDITPOOL_H -#include - -#include - +#include #include #include #include @@ -16,10 +13,13 @@ #include #include +#include + #include #include class BlockManager; +class CBlock; class CBlockIndex; class BlockValidationState; class CEvoDB; diff --git a/src/evo/deterministicmns.h b/src/evo/deterministicmns.h index c8a3020283..52119350f1 100644 --- a/src/evo/deterministicmns.h +++ b/src/evo/deterministicmns.h @@ -29,6 +29,7 @@ class CBlock; class CBlockIndex; class CChainState; +class CCoinsViewCache; class CConnman; class CEvoDB; class TxValidationState; diff --git a/src/evo/dmnstate.h b/src/evo/dmnstate.h index 0a0f62316d..acee5c2b49 100644 --- a/src/evo/dmnstate.h +++ b/src/evo/dmnstate.h @@ -5,12 +5,12 @@ #ifndef BITCOIN_EVO_DMNSTATE_H #define BITCOIN_EVO_DMNSTATE_H -#include #include -#include -#include -#include