mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-01 15:02:34 +02:00
tree-wide: Remove stray review-only assertion
Unfortunately, these assertion don't fit the regex in the scripted-diff. Therefore, we remove it manually.
This commit is contained in:
parent
f323248aba
commit
3e82abb8dd
@ -45,15 +45,7 @@ void RegenerateCommitments(CBlock& block, ChainstateManager& chainman)
|
|||||||
tx.vout.erase(tx.vout.begin() + GetWitnessCommitmentIndex(block));
|
tx.vout.erase(tx.vout.begin() + GetWitnessCommitmentIndex(block));
|
||||||
block.vtx.at(0) = MakeTransactionRef(tx);
|
block.vtx.at(0) = MakeTransactionRef(tx);
|
||||||
|
|
||||||
CBlockIndex* prev_block;
|
CBlockIndex* prev_block = WITH_LOCK(::cs_main, return chainman.m_blockman.LookupBlockIndex(block.hashPrevBlock));
|
||||||
{
|
|
||||||
// TODO: Temporary scope to check correctness of refactored code.
|
|
||||||
// Should be removed manually after merge of
|
|
||||||
// https://github.com/bitcoin/bitcoin/pull/20158
|
|
||||||
LOCK(::cs_main);
|
|
||||||
assert(std::addressof(g_chainman.m_blockman) == std::addressof(chainman.m_blockman));
|
|
||||||
prev_block = chainman.m_blockman.LookupBlockIndex(block.hashPrevBlock);
|
|
||||||
}
|
|
||||||
GenerateCoinbaseCommitment(block, prev_block, Params().GetConsensus());
|
GenerateCoinbaseCommitment(block, prev_block, Params().GetConsensus());
|
||||||
|
|
||||||
block.hashMerkleRoot = BlockMerkleRoot(block);
|
block.hashMerkleRoot = BlockMerkleRoot(block);
|
||||||
|
@ -202,15 +202,7 @@ public:
|
|||||||
}
|
}
|
||||||
uint256 getBestBlockHash() override
|
uint256 getBestBlockHash() override
|
||||||
{
|
{
|
||||||
const CBlockIndex* tip;
|
const CBlockIndex* tip = WITH_LOCK(::cs_main, return chainman().ActiveChain().Tip());
|
||||||
{
|
|
||||||
// TODO: Temporary scope to check correctness of refactored code.
|
|
||||||
// Should be removed manually after merge of
|
|
||||||
// https://github.com/bitcoin/bitcoin/pull/20158
|
|
||||||
LOCK(cs_main);
|
|
||||||
assert(std::addressof(::ChainActive()) == std::addressof(chainman().ActiveChain()));
|
|
||||||
tip = chainman().ActiveChain().Tip();
|
|
||||||
}
|
|
||||||
return tip ? tip->GetBlockHash() : Params().GenesisBlock().GetHash();
|
return tip ? tip->GetBlockHash() : Params().GenesisBlock().GetHash();
|
||||||
}
|
}
|
||||||
int64_t getLastBlockTime() override
|
int64_t getLastBlockTime() override
|
||||||
@ -233,16 +225,7 @@ public:
|
|||||||
return GuessVerificationProgress(Params().TxData(), tip);
|
return GuessVerificationProgress(Params().TxData(), tip);
|
||||||
}
|
}
|
||||||
bool isInitialBlockDownload() override {
|
bool isInitialBlockDownload() override {
|
||||||
const CChainState* active_chainstate;
|
return chainman().ActiveChainstate().IsInitialBlockDownload();
|
||||||
{
|
|
||||||
// TODO: Temporary scope to check correctness of refactored code.
|
|
||||||
// Should be removed manually after merge of
|
|
||||||
// https://github.com/bitcoin/bitcoin/pull/20158
|
|
||||||
LOCK(::cs_main);
|
|
||||||
active_chainstate = &m_context->chainman->ActiveChainstate();
|
|
||||||
assert(std::addressof(::ChainstateActive()) == std::addressof(*active_chainstate));
|
|
||||||
}
|
|
||||||
return active_chainstate->IsInitialBlockDownload();
|
|
||||||
}
|
}
|
||||||
bool getReindex() override { return ::fReindex; }
|
bool getReindex() override { return ::fReindex; }
|
||||||
bool getImporting() override { return ::fImporting; }
|
bool getImporting() override { return ::fImporting; }
|
||||||
@ -647,16 +630,7 @@ public:
|
|||||||
}
|
}
|
||||||
bool isReadyToBroadcast() override { return !::fImporting && !::fReindex && !isInitialBlockDownload(); }
|
bool isReadyToBroadcast() override { return !::fImporting && !::fReindex && !isInitialBlockDownload(); }
|
||||||
bool isInitialBlockDownload() override {
|
bool isInitialBlockDownload() override {
|
||||||
const CChainState* active_chainstate;
|
return chainman().ActiveChainstate().IsInitialBlockDownload();
|
||||||
{
|
|
||||||
// TODO: Temporary scope to check correctness of refactored code.
|
|
||||||
// Should be removed manually after merge of
|
|
||||||
// https://github.com/bitcoin/bitcoin/pull/20158
|
|
||||||
LOCK(::cs_main);
|
|
||||||
active_chainstate = &chainman().ActiveChainstate();
|
|
||||||
assert(std::addressof(::ChainstateActive()) == std::addressof(*active_chainstate));
|
|
||||||
}
|
|
||||||
return active_chainstate->IsInitialBlockDownload();
|
|
||||||
}
|
}
|
||||||
bool shutdownRequested() override { return ShutdownRequested(); }
|
bool shutdownRequested() override { return ShutdownRequested(); }
|
||||||
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
|
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user