From 1a7afed0686582a684dd4280f5d0400580f5fb2a Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Fri, 16 Jul 2021 10:51:11 +0200 Subject: [PATCH] Add Reserved variant to SigHashType for future use (ie SIGHASH_ANYPREVOUT) --- src/util/sighash.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/sighash.rs b/src/util/sighash.rs index 0b85d7d1..d049e37d 100644 --- a/src/util/sighash.rs +++ b/src/util/sighash.rs @@ -113,6 +113,9 @@ pub enum SigHashType { NonePlusAnyoneCanPay = 0x82, /// 0x83: Sign one output and only this input (see `Single` for what "one output" means) SinglePlusAnyoneCanPay = 0x83, + + /// Reserved for future use + Reserved = 0xFF, } /// Possible errors in computing the signature message @@ -225,6 +228,7 @@ impl SigHashType { SigHashType::AllPlusAnyoneCanPay => (SigHashType::All, true), SigHashType::NonePlusAnyoneCanPay => (SigHashType::None, true), SigHashType::SinglePlusAnyoneCanPay => (SigHashType::Single, true), + SigHashType::Reserved => (SigHashType::Reserved, false), } } }