mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-15 16:33:52 +02:00
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:
@@ -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