mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
This commit is contained in:
parent
6642ffb761
commit
da7bbd9dfd
6 changed files with 18 additions and 0 deletions
|
|
@ -642,6 +642,7 @@ bool CTxDB::LoadBlockIndex()
|
|||
// check level 4: check whether spent txouts were spent within the main chain
|
||||
int nOutput = 0;
|
||||
if (nCheckLevel>3)
|
||||
{
|
||||
BOOST_FOREACH(const CDiskTxPos &txpos, txindex.vSpent)
|
||||
{
|
||||
if (!txpos.IsNull())
|
||||
|
|
@ -682,9 +683,11 @@ bool CTxDB::LoadBlockIndex()
|
|||
}
|
||||
nOutput++;
|
||||
}
|
||||
}
|
||||
}
|
||||
// check level 5: check whether all prevouts are marked spent
|
||||
if (nCheckLevel>4)
|
||||
{
|
||||
BOOST_FOREACH(const CTxIn &txin, tx.vin)
|
||||
{
|
||||
CTxIndex txindex;
|
||||
|
|
@ -695,6 +698,7 @@ bool CTxDB::LoadBlockIndex()
|
|||
pindexFork = pindex->pprev;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue