@@ -1524,7 +1524,11 @@ bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const COutPoint
1524
1524
return fClean ;
1525
1525
}
1526
1526
1527
- bool DisconnectBlock (const CBlock& block, CValidationState& state, const CBlockIndex* pindex, CCoinsViewCache& view, bool * pfClean)
1527
+ /* * Undo the effects of this block (with given index) on the UTXO set represented by coins.
1528
+ * In case pfClean is provided, operation will try to be tolerant about errors, and *pfClean
1529
+ * will be true if no problems were found. Otherwise, the return value will be false in case
1530
+ * of problems. Note that in any case, coins may be modified. */
1531
+ static bool DisconnectBlock (const CBlock& block, CValidationState& state, const CBlockIndex* pindex, CCoinsViewCache& view, bool * pfClean = NULL )
1528
1532
{
1529
1533
assert (pindex->GetBlockHash () == view.GetBestBlock ());
1530
1534
@@ -1677,8 +1681,11 @@ static int64_t nTimeIndex = 0;
1677
1681
static int64_t nTimeCallbacks = 0 ;
1678
1682
static int64_t nTimeTotal = 0 ;
1679
1683
1680
- bool ConnectBlock (const CBlock& block, CValidationState& state, CBlockIndex* pindex,
1681
- CCoinsViewCache& view, const CChainParams& chainparams, bool fJustCheck )
1684
+ /* * Apply the effects of this block (with given index) on the UTXO set represented by coins.
1685
+ * Validity checks that depend on the UTXO set are also done; ConnectBlock()
1686
+ * can fail if those validity checks fail (among other reasons). */
1687
+ static bool ConnectBlock (const CBlock& block, CValidationState& state, CBlockIndex* pindex,
1688
+ CCoinsViewCache& view, const CChainParams& chainparams, bool fJustCheck = false )
1682
1689
{
1683
1690
AssertLockHeld (cs_main);
1684
1691
assert (pindex);
0 commit comments