mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
refactor: tidy up implementation of special tx manager (#5172)
## Issue being fixed or feature implemented It is preparation work for #5026 (moved out a refactoring as a new pull request) ## What was done? - tidy up header dependencies - move general code to proper headers ## How Has This Been Tested? Run unit/functional tests ## Breaking Changes No breaking changes ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone
This commit is contained in:
parent
9a03334893
commit
90d888dc31
@ -13,21 +13,13 @@
|
||||
#include <key_io.h>
|
||||
#include <netaddress.h>
|
||||
#include <pubkey.h>
|
||||
#include <tinyformat.h>
|
||||
#include <univalue.h>
|
||||
|
||||
class CBlockIndex;
|
||||
class CCoinsViewCache;
|
||||
class CValidationState;
|
||||
|
||||
struct maybe_error{
|
||||
bool did_err{false};
|
||||
ValidationInvalidReason reason{ValidationInvalidReason::CONSENSUS};
|
||||
std::string_view error_str;
|
||||
|
||||
constexpr maybe_error() = default;
|
||||
constexpr maybe_error(ValidationInvalidReason reasonIn, std::string_view err): did_err(true), reason(reasonIn), error_str(err) {};
|
||||
};
|
||||
|
||||
class CProRegTx
|
||||
{
|
||||
public:
|
||||
|
@ -5,14 +5,25 @@
|
||||
#ifndef BITCOIN_EVO_SPECIALTX_H
|
||||
#define BITCOIN_EVO_SPECIALTX_H
|
||||
|
||||
#include <consensus/validation.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <serialize.h>
|
||||
#include <streams.h>
|
||||
#include <uint256.h>
|
||||
#include <version.h>
|
||||
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
struct maybe_error {
|
||||
bool did_err{false};
|
||||
ValidationInvalidReason reason{ValidationInvalidReason::CONSENSUS};
|
||||
std::string_view error_str;
|
||||
|
||||
constexpr maybe_error() = default;
|
||||
constexpr maybe_error(ValidationInvalidReason reasonIn, std::string_view err): did_err(true), reason(reasonIn), error_str(err) {};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline bool GetTxPayload(const std::vector<unsigned char>& payload, T& obj)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <evo/specialtx.h>
|
||||
#include <evo/specialtxman.h>
|
||||
|
||||
#include <chainparams.h>
|
||||
#include <consensus/validation.h>
|
||||
|
@ -13,6 +13,9 @@ class CBlock;
|
||||
class CBlockIndex;
|
||||
class CCoinsViewCache;
|
||||
class CValidationState;
|
||||
namespace llmq {
|
||||
class CQuorumBlockProcessor;
|
||||
} // namespace llmq
|
||||
|
||||
extern CCriticalSection cs_main;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user