refactor: Convert ChainstateRole enum to struct
Change ChainstateRole parameter passed to wallets and indexes. Wallets and indexes need to know whether chainstate is historical and whether it is fully validated. They should not be aware of the assumeutxo snapshot validation process.
This commit is contained in:
1 parent
352ad27fc1
commit
4dfe383912
26 files changed
+130
-79
No files matched your search
@@ -9,6 +9,8 @@
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
using kernel::ChainstateRole;
|
||||
|
||||
void TestChainstateManager::DisableNextWrite()
|
||||
{
|
||||
struct TestChainstate : public Chainstate {
|
||||
@@ -18,6 +20,7 @@ void TestChainstateManager::DisableNextWrite()
|
||||
static_cast<TestChainstate*>(cs)->ResetNextWrite();
|
||||
}
|
||||
}
|
||||
|
||||
void TestChainstateManager::ResetIbd()
|
||||
{
|
||||
m_cached_finished_ibd = false;
|
||||
@@ -32,10 +35,10 @@ void TestChainstateManager::JumpOutOfIbd()
|
||||
}
|
||||
|
||||
void ValidationInterfaceTest::BlockConnected(
|
||||
ChainstateRole role,
|
||||
CValidationInterface& obj,
|
||||
const std::shared_ptr<const CBlock>& block,
|
||||
const CBlockIndex* pindex)
|
||||
const ChainstateRole& role,
|
||||
CValidationInterface& obj,
|
||||
const std::shared_ptr<const CBlock>& block,
|
||||
const CBlockIndex* pindex)
|
||||
{
|
||||
obj.BlockConnected(role, block, pindex);
|
||||
}
|
||||
Reference in new issue
Block a user