Deprecate SigHashComponents

This commit is contained in:
Gregory Sanders 2020-01-15 11:46:30 -05:00
parent 908aff50bc
commit d1c5c7b08d
1 changed files with 3 additions and 0 deletions

View File

@ -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;