.iter() .map(|(_, txid)| txid) .collect::>(); for (tx, _) in &block.txdata { for input in &tx.input { let prev_output = input.previous_output; // We don't need coinbase input value if prev_output.is_null() { continue; } // We don't need input values from txs earlier in the block, since they'll be added to value_cache // when the tx is indexed if txids.contains(&prev_output.txid) { continue; } // We don't need input values we already have in our value_cache from earlier blocks if value_cache.contains_key(&prev_output) { continue; } // We don't need input values we already have in our outpoint_to_value table from earlier blocks that // were committed to db already if outpoint_to_value.get(&prev_output.store())?.is_some() { continue; } // We don't know the value of this tx input. Send this outpoint to background thread to be fetched