indexes, refactor: Stop requiring CBlockIndex type to call IsBIP30Unspendable
This commit does not change behavior in any way.
This commit is contained in:
1 parent
331a25cb16
commit
0a248708dc
3 files changed
+5
-5
No files matched your search
@@ -150,7 +150,7 @@ bool CoinStatsIndex::CustomAppend(const interfaces::BlockInfo& block)
|
|||||||
const auto& tx{block.data->vtx.at(i)};
|
const auto& tx{block.data->vtx.at(i)};
|
||||||
|
|
||||||
// Skip duplicate txid coinbase transactions (BIP30).
|
// Skip duplicate txid coinbase transactions (BIP30).
|
||||||
if (IsBIP30Unspendable(*pindex) && tx->IsCoinBase()) {
|
if (IsBIP30Unspendable(block.hash, block.height) && tx->IsCoinBase()) {
|
||||||
m_total_unspendable_amount += block_subsidy;
|
m_total_unspendable_amount += block_subsidy;
|
||||||
m_total_unspendables_bip30 += block_subsidy;
|
m_total_unspendables_bip30 += block_subsidy;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
+3
-3
@@ -6341,10 +6341,10 @@ bool IsBIP30Repeat(const CBlockIndex& block_index)
|
|||||||
(block_index.nHeight==91880 && block_index.GetBlockHash() == uint256{"00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721"});
|
(block_index.nHeight==91880 && block_index.GetBlockHash() == uint256{"00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721"});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsBIP30Unspendable(const CBlockIndex& block_index)
|
bool IsBIP30Unspendable(const uint256& block_hash, int block_height)
|
||||||
{
|
{
|
||||||
return (block_index.nHeight==91722 && block_index.GetBlockHash() == uint256{"00000000000271a2dc26e7667f8419f2e15416dc6955e5a6c6cdf3f2574dd08e"}) ||
|
return (block_height==91722 && block_hash == uint256{"00000000000271a2dc26e7667f8419f2e15416dc6955e5a6c6cdf3f2574dd08e"}) ||
|
||||||
(block_index.nHeight==91812 && block_index.GetBlockHash() == uint256{"00000000000af0aed4792b1acee3d966af36cf5def14935db8de83d6f9306f2f"});
|
(block_height==91812 && block_hash == uint256{"00000000000af0aed4792b1acee3d966af36cf5def14935db8de83d6f9306f2f"});
|
||||||
}
|
}
|
||||||
|
|
||||||
static fs::path GetSnapshotCoinsDBPath(Chainstate& cs) EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
|
static fs::path GetSnapshotCoinsDBPath(Chainstate& cs) EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
|
||||||
|
|||||||
+1
-1
@@ -1350,6 +1350,6 @@ bool DeploymentEnabled(const ChainstateManager& chainman, DEP dep)
|
|||||||
bool IsBIP30Repeat(const CBlockIndex& block_index);
|
bool IsBIP30Repeat(const CBlockIndex& block_index);
|
||||||
|
|
||||||
/** Identifies blocks which coinbase output was subsequently overwritten in the UTXO set (see BIP30) */
|
/** Identifies blocks which coinbase output was subsequently overwritten in the UTXO set (see BIP30) */
|
||||||
bool IsBIP30Unspendable(const CBlockIndex& block_index);
|
bool IsBIP30Unspendable(const uint256& block_hash, int block_height);
|
||||||
|
|
||||||
#endif // BITCOIN_VALIDATION_H
|
#endif // BITCOIN_VALIDATION_H
|
||||||
Reference in new issue
Block a user