Skip to content

Commit

Permalink
Add Reserved variant to SigHashType for future use (ie SIGHASH_ANYPRE…
Browse files Browse the repository at this point in the history
…VOUT)
  • Loading branch information
RCasatta committed Jul 16, 2021
1 parent bc42593 commit 877dc47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/util/sighash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,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
Expand Down Expand Up @@ -221,6 +224,7 @@ impl SigHashType {
SigHashType::AllPlusAnyoneCanPay => (SigHashType::All, true),
SigHashType::NonePlusAnyoneCanPay => (SigHashType::None, true),
SigHashType::SinglePlusAnyoneCanPay => (SigHashType::Single, true),
SigHashType::Reserved => (SigHashType::Reserved, false),
}
}
}
Expand Down

0 comments on commit 877dc47

Please sign in to comment.