File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,11 @@ func (ls MockLedgerState) StakeRegistration(
51
51
) ([]common.StakeRegistrationCertificate , error ) {
52
52
ret := []common.StakeRegistrationCertificate {}
53
53
for _ , cert := range ls .MockStakeRegistration {
54
- if string (cert .StakeRegistration .Credential ) == string (stakingKey ) {
54
+ if string (
55
+ common .Blake2b224 (cert .StakeRegistration .Credential ).Bytes (),
56
+ ) == string (
57
+ stakingKey ,
58
+ ) {
55
59
ret = append (ret , cert )
56
60
}
57
61
}
Original file line number Diff line number Diff line change @@ -27,11 +27,13 @@ const (
27
27
CredentialTypeScriptHash = 1
28
28
)
29
29
30
+ type CredentialHash Blake2b224
31
+
30
32
type Credential struct {
31
33
cbor.StructAsArray
32
34
cbor.DecodeStoreCbor
33
35
CredType uint
34
- Credential [] byte
36
+ Credential CredentialHash
35
37
}
36
38
37
39
func (c * Credential ) UnmarshalCBOR (data []byte ) error {
You can’t perform that action at this time.
0 commit comments