@@ -31,8 +31,8 @@ func DepositLogToRequest(data []byte) ([]byte, error) {
31
31
return nil , fmt .Errorf ("deposit wrong length: want 576, have %d" , len (data ))
32
32
}
33
33
34
- var outputRequest = make ([]byte , depositRequestSize )
35
- outputRequest [0 ] = depositRequestType
34
+ var request = make ([]byte , depositRequestSize )
35
+ request [0 ] = depositRequestType
36
36
const (
37
37
pubkeyOffset = 1
38
38
withdrawalCredOffset = pubkeyOffset + 48
@@ -47,20 +47,20 @@ func DepositLogToRequest(data []byte) ([]byte, error) {
47
47
// PublicKey is the first element. ABI encoding pads values to 32 bytes, so
48
48
// despite BLS public keys being length 48, the value length here is 64. Then
49
49
// skip over the next length value.
50
- copy (outputRequest [pubkeyOffset :], data [b :b + 48 ])
50
+ copy (request [pubkeyOffset :], data [b :b + 48 ])
51
51
b += 48 + 16 + 32
52
52
// WithdrawalCredentials is 32 bytes. Read that value then skip over next
53
53
// length.
54
- copy (outputRequest [withdrawalCredOffset :], data [b :b + 32 ])
54
+ copy (request [withdrawalCredOffset :], data [b :b + 32 ])
55
55
b += 32 + 32
56
56
// Amount is 8 bytes, but it is padded to 32. Skip over it and the next
57
57
// length.
58
- copy (outputRequest [amountOffset :], data [b :b + 8 ])
58
+ copy (request [amountOffset :], data [b :b + 8 ])
59
59
b += 8 + 24 + 32
60
60
// Signature is 96 bytes. Skip over it and the next length.
61
- copy (outputRequest [signatureOffset :], data [b :b + 96 ])
61
+ copy (request [signatureOffset :], data [b :b + 96 ])
62
62
b += 96 + 32
63
63
// Index is 8 bytes.
64
- copy (outputRequest [indexOffset :], data [b :b + 8 ])
65
- return outputRequest , nil
64
+ copy (request [indexOffset :], data [b :b + 8 ])
65
+ return request , nil
66
66
}
0 commit comments