@@ -15,46 +15,46 @@ import (
15
15
func HashStoreChunksRequest (request * grpc.StoreChunksRequest ) []byte {
16
16
hasher := sha3 .NewLegacyKeccak256 ()
17
17
18
- hashBatchHeader (hasher , request .Batch . Header )
19
- for _ , blobCertificate := range request .Batch . BlobCertificates {
18
+ hashBatchHeader (hasher , request .GetBatch (). GetHeader () )
19
+ for _ , blobCertificate := range request .GetBatch (). GetBlobCertificates () {
20
20
hashBlobCertificate (hasher , blobCertificate )
21
21
}
22
- hashUint32 (hasher , request .DisperserID )
22
+ hashUint32 (hasher , request .GetDisperserID () )
23
23
24
24
return hasher .Sum (nil )
25
25
}
26
26
27
27
func hashBlobCertificate (hasher hash.Hash , blobCertificate * common.BlobCertificate ) {
28
- hashBlobHeader (hasher , blobCertificate .BlobHeader )
29
- hasher .Write (blobCertificate .Signature )
30
- for _ , relayKey := range blobCertificate .RelayKeys {
28
+ hashBlobHeader (hasher , blobCertificate .GetBlobHeader () )
29
+ hasher .Write (blobCertificate .GetSignature () )
30
+ for _ , relayKey := range blobCertificate .GetRelayKeys () {
31
31
hashUint32 (hasher , relayKey )
32
32
}
33
33
}
34
34
35
35
func hashBlobHeader (hasher hash.Hash , header * common.BlobHeader ) {
36
- hashUint32 (hasher , header .Version )
37
- for _ , quorum := range header .QuorumNumbers {
36
+ hashUint32 (hasher , header .GetVersion () )
37
+ for _ , quorum := range header .GetQuorumNumbers () {
38
38
hashUint32 (hasher , quorum )
39
39
}
40
- hashBlobCommitment (hasher , header .Commitment )
41
- hashPaymentHeader (hasher , header .PaymentHeader )
40
+ hashBlobCommitment (hasher , header .GetCommitment () )
41
+ hashPaymentHeader (hasher , header .GetPaymentHeader () )
42
42
}
43
43
44
44
func hashBatchHeader (hasher hash.Hash , header * common.BatchHeader ) {
45
- hasher .Write (header .BatchRoot )
46
- hashUint64 (hasher , header .ReferenceBlockNumber )
45
+ hasher .Write (header .GetBatchRoot () )
46
+ hashUint64 (hasher , header .GetReferenceBlockNumber () )
47
47
}
48
48
49
49
func hashBlobCommitment (hasher hash.Hash , commitment * commonv1.BlobCommitment ) {
50
- hasher .Write (commitment .Commitment )
51
- hasher .Write (commitment .LengthCommitment )
52
- hasher .Write (commitment .LengthProof )
53
- hashUint32 (hasher , commitment .Length )
50
+ hasher .Write (commitment .GetCommitment () )
51
+ hasher .Write (commitment .GetLengthCommitment () )
52
+ hasher .Write (commitment .GetLengthProof () )
53
+ hashUint32 (hasher , commitment .GetLength () )
54
54
}
55
55
56
56
func hashPaymentHeader (hasher hash.Hash , header * common.PaymentHeader ) {
57
- hasher .Write ([]byte (header .AccountId ))
58
- hashInt64 (hasher , header .Timestamp )
59
- hasher .Write (header .CumulativePayment )
57
+ hasher .Write ([]byte (header .GetAccountId () ))
58
+ hashInt64 (hasher , header .GetTimestamp () )
59
+ hasher .Write (header .GetCumulativePayment () )
60
60
}
0 commit comments