Skip to content

Commit b61af3b

Browse files
committed
core/types: rename variable
1 parent 1a26387 commit b61af3b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

core/types/deposit.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ func DepositLogToRequest(data []byte) ([]byte, error) {
3131
return nil, fmt.Errorf("deposit wrong length: want 576, have %d", len(data))
3232
}
3333

34-
var outputRequest = make([]byte, depositRequestSize)
35-
outputRequest[0] = depositRequestType
34+
var request = make([]byte, depositRequestSize)
35+
request[0] = depositRequestType
3636
const (
3737
pubkeyOffset = 1
3838
withdrawalCredOffset = pubkeyOffset + 48
@@ -47,20 +47,20 @@ func DepositLogToRequest(data []byte) ([]byte, error) {
4747
// PublicKey is the first element. ABI encoding pads values to 32 bytes, so
4848
// despite BLS public keys being length 48, the value length here is 64. Then
4949
// skip over the next length value.
50-
copy(outputRequest[pubkeyOffset:], data[b:b+48])
50+
copy(request[pubkeyOffset:], data[b:b+48])
5151
b += 48 + 16 + 32
5252
// WithdrawalCredentials is 32 bytes. Read that value then skip over next
5353
// length.
54-
copy(outputRequest[withdrawalCredOffset:], data[b:b+32])
54+
copy(request[withdrawalCredOffset:], data[b:b+32])
5555
b += 32 + 32
5656
// Amount is 8 bytes, but it is padded to 32. Skip over it and the next
5757
// length.
58-
copy(outputRequest[amountOffset:], data[b:b+8])
58+
copy(request[amountOffset:], data[b:b+8])
5959
b += 8 + 24 + 32
6060
// 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])
6262
b += 96 + 32
6363
// 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
6666
}

0 commit comments

Comments
 (0)