Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Remove PARANOID build option #5631

Closed
chfast opened this issue Jun 18, 2019 · 1 comment · Fixed by #5655
Closed

Remove PARANOID build option #5631

chfast opened this issue Jun 18, 2019 · 1 comment · Fixed by #5655

Comments

@chfast
Copy link
Member

chfast commented Jun 18, 2019

Together with #define ETH_PARANOIA.

@moneroexamples
Copy link
Contributor

Should entire blocks of code enclosed by #if ETH_PARANOIA also be removed? Or just the #if ETH_PARANOIA should be removed and the blocks be unattached? For example, should the following peace of code be fully removed?

#if ETH_PARANOIA
if (isKnown(_block.info.hash()) && !details(_block.info.hash()))
{
LOG(m_loggerError) << "Known block just inserted has no details.";
LOG(m_loggerError) << "Block: " << _block.info;
LOG(m_loggerError) << "DATABASE CORRUPTION: CRITICAL FAILURE";
exit(-1);
}
try
{
State canary(_db, BaseState::Empty);
canary.populateFromChain(*this, _block.info.hash());
}
catch (...)
{
LOG(m_loggerError) << "Failed to initialise State object form imported block.";
LOG(m_loggerError) << "Block: " << _block.info;
LOG(m_loggerError) << "DATABASE CORRUPTION: CRITICAL FAILURE";
exit(-1);
}
#endif // ETH_PARANOIA

chrisjgf added a commit to chrisjgf/aleth that referenced this issue Jul 7, 2019
chrisjgf added a commit to chrisjgf/aleth that referenced this issue Jul 7, 2019
chrisjgf added a commit to chrisjgf/aleth that referenced this issue Jul 8, 2019
chrisjgf added a commit to chrisjgf/aleth that referenced this issue Jul 8, 2019
chrisjgf added a commit to chrisjgf/aleth that referenced this issue Jul 8, 2019
chfast added a commit that referenced this issue Jul 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants