refactor: move ChainLocksSigningEnabled from header to cpp file as static function

This commit is contained in:
Konstantin Akimov 2024-09-26 19:25:12 +07:00
parent cab700aae3
commit d54b3eeb7b
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524
2 changed files with 5 additions and 7 deletions

View File

@ -23,6 +23,11 @@
#include <validation.h> #include <validation.h>
#include <validationinterface.h> #include <validationinterface.h>
static bool ChainLocksSigningEnabled(const CSporkManager& sporkman)
{
return sporkman.GetSporkValue(SPORK_19_CHAINLOCKS_ENABLED) == 0;
}
namespace llmq namespace llmq
{ {
std::unique_ptr<CChainLocksHandler> chainLocksHandler; std::unique_ptr<CChainLocksHandler> chainLocksHandler;
@ -678,9 +683,4 @@ bool AreChainLocksEnabled(const CSporkManager& sporkman)
return sporkman.IsSporkActive(SPORK_19_CHAINLOCKS_ENABLED); return sporkman.IsSporkActive(SPORK_19_CHAINLOCKS_ENABLED);
} }
bool ChainLocksSigningEnabled(const CSporkManager& sporkman)
{
return sporkman.GetSporkValue(SPORK_19_CHAINLOCKS_ENABLED) == 0;
}
} // namespace llmq } // namespace llmq

View File

@ -132,8 +132,6 @@ private:
extern std::unique_ptr<CChainLocksHandler> chainLocksHandler; extern std::unique_ptr<CChainLocksHandler> chainLocksHandler;
bool AreChainLocksEnabled(const CSporkManager& sporkman); bool AreChainLocksEnabled(const CSporkManager& sporkman);
bool ChainLocksSigningEnabled(const CSporkManager& sporkman);
} // namespace llmq } // namespace llmq
#endif // BITCOIN_LLMQ_CHAINLOCKS_H #endif // BITCOIN_LLMQ_CHAINLOCKS_H