mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
core/types: update deposit request encoding
This commit is contained in:
parent
e9cf6255cb
commit
c87fd76613
1 changed files with 3 additions and 5 deletions
|
|
@ -21,8 +21,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
depositRequestType = 0x00
|
depositRequestSize = 192
|
||||||
depositRequestSize = 192 + 1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnpackIntoDeposit unpacks a serialized DepositEvent.
|
// UnpackIntoDeposit unpacks a serialized DepositEvent.
|
||||||
|
|
@ -31,10 +30,9 @@ func DepositLogToRequest(data []byte) ([]byte, error) {
|
||||||
return nil, fmt.Errorf("deposit wrong length: want 576, have %d", len(data))
|
return nil, fmt.Errorf("deposit wrong length: want 576, have %d", len(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
var request = make([]byte, depositRequestSize)
|
request := make([]byte, depositRequestSize)
|
||||||
request[0] = depositRequestType
|
|
||||||
const (
|
const (
|
||||||
pubkeyOffset = 1
|
pubkeyOffset = 0
|
||||||
withdrawalCredOffset = pubkeyOffset + 48
|
withdrawalCredOffset = pubkeyOffset + 48
|
||||||
amountOffset = withdrawalCredOffset + 32
|
amountOffset = withdrawalCredOffset + 32
|
||||||
signatureOffset = amountOffset + 8
|
signatureOffset = amountOffset + 8
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue