From d1c5c7b08d68c39218ffb9095896ec152f8097c1 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Wed, 15 Jan 2020 11:46:30 -0500 Subject: [PATCH] Deprecate SigHashComponents --- src/util/bip143.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/bip143.rs b/src/util/bip143.rs index 23a3fd97..51b9adfc 100644 --- a/src/util/bip143.rs +++ b/src/util/bip143.rs @@ -28,6 +28,7 @@ use consensus::encode::Encodable; /// Parts of a sighash which are common across inputs or signatures, and which are /// sufficient (in conjunction with a private key) to sign the transaction #[derive(Clone, PartialEq, Eq, Debug)] +#[deprecated(since="0.24.0", note="please use `SigHashCache` instead")] pub struct SighashComponents { tx_version: u32, tx_locktime: u32, @@ -39,6 +40,7 @@ pub struct SighashComponents { pub hash_outputs: SigHash, } +#[allow(deprecated)] impl SighashComponents { /// Compute the sighash components from an unsigned transaction and auxiliary /// information about its inputs. @@ -214,6 +216,7 @@ impl<'a> SigHashCache<'a> { } #[cfg(test)] +#[allow(deprecated)] mod tests { use hash_types::SigHash; use blockdata::script::Script;