Skip to content

Commit 40c5daa

Browse files
chore: rename the type constants
1 parent 6bc5afc commit 40c5daa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ledger/common/credentials.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
)
2424

2525
const (
26-
StakeCredentialTypeAddrKeyHash = 0
27-
StakeCredentialTypeScriptHash = 1
26+
CredentialTypeAddrKeyHash = 0
27+
CredentialTypeScriptHash = 1
2828
)
2929

3030
type Credential struct {
@@ -57,11 +57,11 @@ func (c *Credential) Hash() Blake2b224 {
5757
func (c *Credential) Utxorpc() *utxorpc.StakeCredential {
5858
ret := &utxorpc.StakeCredential{}
5959
switch c.CredType {
60-
case StakeCredentialTypeAddrKeyHash:
60+
case CredentialTypeAddrKeyHash:
6161
ret.StakeCredential = &utxorpc.StakeCredential_AddrKeyHash{
6262
AddrKeyHash: c.Credential[:],
6363
}
64-
case StakeCredentialTypeScriptHash:
64+
case CredentialTypeScriptHash:
6565
ret.StakeCredential = &utxorpc.StakeCredential_ScriptHash{
6666
ScriptHash: c.Credential[:],
6767
}

0 commit comments

Comments
 (0)