@@ -21,8 +21,8 @@ func (m MockIssuerVkey) Hash() []byte {
2121
2222// MockBlockHeader implements BlockHeader interface
2323type MockBlockHeader struct {
24- hash string
25- prevHash string
24+ hash common. Blake2b256
25+ prevHash common. Blake2b256
2626 blockNumber uint64
2727 slotNumber uint64
2828 issuerVkey common.IssuerVkey
@@ -31,11 +31,11 @@ type MockBlockHeader struct {
3131 cborBytes []byte
3232}
3333
34- func (m MockBlockHeader ) Hash () string {
34+ func (m MockBlockHeader ) Hash () common. Blake2b256 {
3535 return m .hash
3636}
3737
38- func (m MockBlockHeader ) PrevHash () string {
38+ func (m MockBlockHeader ) PrevHash () common. Blake2b256 {
3939 return m .prevHash
4040}
4141
@@ -127,8 +127,8 @@ func TestNewBlockContext(t *testing.T) {
127127 era : common.Era {
128128 Name : "Shelley" ,
129129 },
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" )) ,
132132 blockBodySize : 1024 ,
133133 cborBytes : []byte {0x01 , 0x02 , 0x03 },
134134 },
@@ -148,8 +148,8 @@ func TestNewBlockContext(t *testing.T) {
148148 era : common.Era {
149149 Name : "Allegra" ,
150150 },
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" )) ,
153153 blockBodySize : 2048 ,
154154 cborBytes : []byte {0x04 , 0x05 , 0x06 },
155155 },
@@ -169,8 +169,8 @@ func TestNewBlockContext(t *testing.T) {
169169 era : common.Era {
170170 Name : "Mary" ,
171171 },
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" )) ,
174174 blockBodySize : 4096 ,
175175 cborBytes : []byte {0x07 , 0x08 , 0x09 },
176176 },
@@ -230,8 +230,8 @@ func TestNewBlockContextEdgeCases(t *testing.T) {
230230 era : common.Era {
231231 Name : "" ,
232232 },
233- hash : "" ,
234- prevHash : "" ,
233+ hash : common. Blake2b256 {} ,
234+ prevHash : common. Blake2b256 {} ,
235235 blockBodySize : 0 ,
236236 cborBytes : []byte {},
237237 },
@@ -249,8 +249,8 @@ func TestNewBlockContextEdgeCases(t *testing.T) {
249249 era : common.Era {
250250 Name : "Alonzo" ,
251251 },
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" )) ,
254254 blockBodySize : ^ uint64 (0 ),
255255 cborBytes : []byte {0x0A , 0x0B , 0x0C },
256256 },
0 commit comments