Skip to content

Commit

Permalink
consensus: make inner bytes in hash types public to allow match patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Oct 8, 2023
1 parent f9a61ab commit 43cc232
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions consensus/src/hashtypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use crate::LIB_NAME_BITCOIN;
pub struct PubkeyHash(
#[from]
#[from([u8; 20])]
Bytes20,
pub Bytes20,
);

impl From<PubkeyHash> for [u8; 20] {
Expand All @@ -54,7 +54,7 @@ impl From<PubkeyHash> for [u8; 20] {
pub struct ScriptHash(
#[from]
#[from([u8; 20])]
Bytes20,
pub Bytes20,
);

impl From<ScriptHash> for [u8; 20] {
Expand All @@ -73,7 +73,7 @@ impl From<ScriptHash> for [u8; 20] {
pub struct WPubkeyHash(
#[from]
#[from([u8; 20])]
Bytes20,
pub Bytes20,
);

impl From<WPubkeyHash> for [u8; 20] {
Expand All @@ -92,7 +92,7 @@ impl From<WPubkeyHash> for [u8; 20] {
pub struct WScriptHash(
#[from]
#[from([u8; 32])]
Bytes32,
pub Bytes32,
);

impl From<WScriptHash> for [u8; 32] {
Expand Down

0 comments on commit 43cc232

Please sign in to comment.