Change deprecated version to 0.28. Remove redundant Block::merkle_root() logic.

This commit is contained in:
Nils Loewen 2022-01-12 16:23:35 -08:00
parent 05788285f5
commit cd2435c807
No known key found for this signature in database
GPG Key ID: D7A47D2C84312FF5
1 changed files with 2 additions and 3 deletions

View File

@ -219,10 +219,9 @@ impl Block {
} }
/// Calculate the transaction merkle root. /// Calculate the transaction merkle root.
#[deprecated(since = "0.27.1", note = "Please use `block::compute_merkle_root` instead.")] #[deprecated(since = "0.28.0", note = "Please use `block::compute_merkle_root` instead.")]
pub fn merkle_root(&self) -> Option<TxMerkleNode> { pub fn merkle_root(&self) -> Option<TxMerkleNode> {
let hashes = self.txdata.iter().map(|obj| obj.txid().as_hash()); self.compute_merkle_root()
bitcoin_merkle_root(hashes).map(|h| h.into())
} }
/// compute witness commitment for the transaction list /// compute witness commitment for the transaction list