state: skip transactions in a genesis block

This commit is contained in:
Henry de Valence 2020-10-27 14:55:46 -07:00
parent 1573e0e4ae
commit 68b9a70a60
1 changed files with 6 additions and 0 deletions

View File

@ -243,6 +243,12 @@ impl FinalizedState {
// TODO: sprout and sapling anchors (per block)
// Consensus-critical bug in zcashd: transactions in the
// genesis block are ignored.
if block.header.previous_block_hash == block::Hash([0; 32]) {
return Ok(hash);
}
// Index each transaction
for transaction in block.transactions.iter() {
let transaction_hash = transaction.hash();