@@ -21,8 +21,8 @@ func (m MockIssuerVkey) Hash() []byte {
21
21
22
22
// MockBlockHeader implements BlockHeader interface
23
23
type MockBlockHeader struct {
24
- hash string
25
- prevHash string
24
+ hash common. Blake2b256
25
+ prevHash common. Blake2b256
26
26
blockNumber uint64
27
27
slotNumber uint64
28
28
issuerVkey common.IssuerVkey
@@ -31,11 +31,11 @@ type MockBlockHeader struct {
31
31
cborBytes []byte
32
32
}
33
33
34
- func (m MockBlockHeader ) Hash () string {
34
+ func (m MockBlockHeader ) Hash () common. Blake2b256 {
35
35
return m .hash
36
36
}
37
37
38
- func (m MockBlockHeader ) PrevHash () string {
38
+ func (m MockBlockHeader ) PrevHash () common. Blake2b256 {
39
39
return m .prevHash
40
40
}
41
41
@@ -127,8 +127,8 @@ func TestNewBlockContext(t *testing.T) {
127
127
era : common.Era {
128
128
Name : "Shelley" ,
129
129
},
130
- hash : "sample-hash-shelley" ,
131
- prevHash : "prev-hash-shelley" ,
130
+ hash : common . NewBlake2b256 ([] byte ( "sample-hash-shelley" )) ,
131
+ prevHash : common . NewBlake2b256 ([] byte ( "prev-hash-shelley" )) ,
132
132
blockBodySize : 1024 ,
133
133
cborBytes : []byte {0x01 , 0x02 , 0x03 },
134
134
},
@@ -148,8 +148,8 @@ func TestNewBlockContext(t *testing.T) {
148
148
era : common.Era {
149
149
Name : "Allegra" ,
150
150
},
151
- hash : "another-hash-allegra" ,
152
- prevHash : "prev-hash-allegra" ,
151
+ hash : common . NewBlake2b256 ([] byte ( "another-hash-allegra" )) ,
152
+ prevHash : common . NewBlake2b256 ([] byte ( "prev-hash-allegra" )) ,
153
153
blockBodySize : 2048 ,
154
154
cborBytes : []byte {0x04 , 0x05 , 0x06 },
155
155
},
@@ -169,8 +169,8 @@ func TestNewBlockContext(t *testing.T) {
169
169
era : common.Era {
170
170
Name : "Mary" ,
171
171
},
172
- hash : "mary-block-hash" ,
173
- prevHash : "prev-hash-mary" ,
172
+ hash : common . NewBlake2b256 ([] byte ( "mary-block-hash" )) ,
173
+ prevHash : common . NewBlake2b256 ([] byte ( "prev-hash-mary" )) ,
174
174
blockBodySize : 4096 ,
175
175
cborBytes : []byte {0x07 , 0x08 , 0x09 },
176
176
},
@@ -230,8 +230,8 @@ func TestNewBlockContextEdgeCases(t *testing.T) {
230
230
era : common.Era {
231
231
Name : "" ,
232
232
},
233
- hash : "" ,
234
- prevHash : "" ,
233
+ hash : common. Blake2b256 {} ,
234
+ prevHash : common. Blake2b256 {} ,
235
235
blockBodySize : 0 ,
236
236
cborBytes : []byte {},
237
237
},
@@ -249,8 +249,8 @@ func TestNewBlockContextEdgeCases(t *testing.T) {
249
249
era : common.Era {
250
250
Name : "Alonzo" ,
251
251
},
252
- hash : "max-block-hash" ,
253
- prevHash : "max-prev-hash" ,
252
+ hash : common . NewBlake2b256 ([] byte ( "max-block-hash" )) ,
253
+ prevHash : common . NewBlake2b256 ([] byte ( "max-prev-hash" )) ,
254
254
blockBodySize : ^ uint64 (0 ),
255
255
cborBytes : []byte {0x0A , 0x0B , 0x0C },
256
256
},
0 commit comments