-
Notifications
You must be signed in to change notification settings - Fork 1
/
submitblock.go
29 lines (25 loc) · 902 Bytes
/
submitblock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package v2
import (
"encoding/json"
"fmt"
v1 "github.com/attestantio/go-builder-client/api/v1"
"github.com/attestantio/go-eth2-client/spec/bellatrix"
"github.com/attestantio/go-eth2-client/spec/capella"
"github.com/attestantio/go-eth2-client/spec/phase0"
)
// SubmitBlockRequest is the v2 request from the builder to submit a block.
type SubmitBlockRequest struct {
Message *v1.BidTrace
ExecutionPayloadHeader *capella.ExecutionPayloadHeader
Signature phase0.BLSSignature `ssz-size:"96"`
Transactions []bellatrix.Transaction `ssz-max:"1048576,1073741824" ssz-size:"?,?"`
Withdrawals []*capella.Withdrawal `ssz-max:"16"`
}
// String returns a string version of the structure.
func (s *SubmitBlockRequest) String() string {
data, err := json.Marshal(s)
if err != nil {
return fmt.Sprintf("ERR: %v", err)
}
return string(data)
}