Skip to content

Commit d60aa9d

Browse files
authored
refactor: make CredentialHash/AddrKeyHash aliases of Blake2b224 (#966)
This makes the types interchangeable with Blake2b224 for convenience. It also allows using the Bytes() function when using the more specific types Signed-off-by: Aurora Gaffney <[email protected]>
1 parent aba2b7e commit d60aa9d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ledger/common/address.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const (
5151
ByronAddressTypeRedeem = 2
5252
)
5353

54-
type AddrKeyHash Blake2b224
54+
type AddrKeyHash = Blake2b224
5555

5656
type Address struct {
5757
addressType uint8

ledger/common/credentials.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const (
2727
CredentialTypeScriptHash = 1
2828
)
2929

30-
type CredentialHash Blake2b224
30+
type CredentialHash = Blake2b224
3131

3232
type Credential struct {
3333
cbor.StructAsArray

0 commit comments

Comments
 (0)