mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 17:02:43 +00:00
index: Check BIP30 blocks when rewinding Coinstatsindex
This is practically irrelevant due to the unlikeliness of a re-org reaching so deep that it would drop the BIP30 blocks from the chain (91842 and 91880). However this serves as documentation and ensures that the functions RevertBlock and CustomAppend are consistent.
This commit is contained in:
parent
51df9de8e5
commit
37c4fba1f4
@ -426,6 +426,10 @@ bool CoinStatsIndex::RevertBlock(const interfaces::BlockInfo& block)
|
||||
const auto& tx{block.data->vtx.at(i)};
|
||||
const bool is_coinbase{tx->IsCoinBase()};
|
||||
|
||||
if (is_coinbase && IsBIP30Unspendable(block.hash, block.height)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (uint32_t j = 0; j < tx->vout.size(); ++j) {
|
||||
const CTxOut& out{tx->vout[j]};
|
||||
const COutPoint outpoint{tx->GetHash(), j};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user