@@ -1524,7 +1524,11 @@ bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const COutPoint
15241524 return fClean ;
15251525}
15261526
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 )
15281532{
15291533 assert (pindex->GetBlockHash () == view.GetBestBlock ());
15301534
@@ -1677,8 +1681,11 @@ static int64_t nTimeIndex = 0;
16771681static int64_t nTimeCallbacks = 0 ;
16781682static int64_t nTimeTotal = 0 ;
16791683
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 )
16821689{
16831690 AssertLockHeld (cs_main);
16841691 assert (pindex);
0 commit comments