Version 0.32.2 of `rust-bitcoin` deprecates a number of methods that
are commonly used in this project, most visibly `txid()`, which is
now called `compute_txid()`. This resulted in a lot of warnings, and
this commit is part of a series that seeks to address that.
return Err(UtxoLookupError::UnknownTx);
}
- outpoint = OutPoint::new(transaction.txid(), output_index.into());
+ outpoint = OutPoint::new(transaction.compute_txid(), output_index.into());
output = transaction.output[output_index as usize].clone();
}};
}
if self.height % 2016 == 0 {
let target = self.header.target();
let previous_target = previous_header.header.target();
- let min_target = previous_target.min_difficulty_transition_threshold();
- let max_target = previous_target.max_difficulty_transition_threshold();
+ let min_target = previous_target.min_transition_threshold();
+ let max_target = previous_target.max_transition_threshold_unchecked();
if target > max_target || target < min_target {
return Err(BlockSourceError::persistent("invalid difficulty transition"));
}
input: vec![],
output: vec![],
};
- let merkle_root = TxMerkleNode::from_raw_hash(coinbase.txid().to_raw_hash());
+ let merkle_root = TxMerkleNode::from_raw_hash(coinbase.compute_txid().to_raw_hash());
self.blocks.push(Block {
header: Header {
version: Version::NO_SOFT_FORK_SIGNALLING,