Change deprecated version to 0.28. Remove redundant Block::merkle_root() logic.
This commit is contained in:
parent
05788285f5
commit
cd2435c807
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue