Documentation ¶
Index ¶
- Variables
- func HexToAddress(s string) (ret bellatrix.ExecutionAddress)
- func HexToBytes(hex string) []byte
- func HexToHash(s string) (ret phase0.Hash32)
- func HexToPubkey(s string) (ret phase0.BLSPubKey)
- func HexToSignature(s string) (ret phase0.BLSSignature)
- type Relay
- func (m *Relay) DefaultHandleGetPayload(w http.ResponseWriter)
- func (m *Relay) GetRequestCount(path string) int
- func (m *Relay) MakeGetHeaderResponse(value uint64, blockHash, parentHash, publicKey string, ...) *builderSpec.VersionedSignedBuilderBid
- func (m *Relay) MakeGetPayloadResponse(parentHash, blockHash, feeRecipient string, blockNumber uint64, ...) *builderApi.VersionedSubmitBlindedBlockResponse
- func (m *Relay) OverrideHandleGetPayload(method func(w http.ResponseWriter, req *http.Request))
- func (m *Relay) OverrideHandleRegisterValidator(method func(w http.ResponseWriter, req *http.Request))
Constants ¶
This section is empty.
Variables ¶
var TestLog = logrus.NewEntry(logrus.New())
TestLog is used to log information in the test methods
Functions ¶
func HexToAddress ¶
func HexToAddress(s string) (ret bellatrix.ExecutionAddress)
HexToAddress converts a hexadecimal string to an Ethereum address
func HexToBytes ¶
HexToBytes converts a hexadecimal string to a byte array
func HexToPubkey ¶
HexToPubkey converts a hexadecimal string to a BLS Public Key
func HexToSignature ¶
func HexToSignature(s string) (ret phase0.BLSSignature)
HexToSignature converts a hexadecimal string to a BLS Signature
Types ¶
type Relay ¶
type Relay struct { RelayEntry types.RelayEntry // Default responses placeholders, used if overrider does not exist GetHeaderResponse *builderSpec.VersionedSignedBuilderBid GetPayloadResponse *builderApi.VersionedSubmitBlindedBlockResponse // Server section Server *httptest.Server ResponseDelay time.Duration // contains filtered or unexported fields }
Relay is used to fake a relay's behavior. You can override each of its handler by setting the instance's HandlerOverride_METHOD_TO_OVERRIDE to your own handler.
func NewRelay ¶
NewRelay creates a mocked relay which implements the backend.BoostBackend interface A secret key must be provided to sign default and custom response messages
func (*Relay) DefaultHandleGetPayload ¶
func (m *Relay) DefaultHandleGetPayload(w http.ResponseWriter)
DefaultHandleGetPayload returns the default handler for handleGetPayload
func (*Relay) GetRequestCount ¶
GetRequestCount returns the number of Request made to a specific URL
func (*Relay) MakeGetHeaderResponse ¶
func (m *Relay) MakeGetHeaderResponse(value uint64, blockHash, parentHash, publicKey string, version spec.DataVersion) *builderSpec.VersionedSignedBuilderBid
MakeGetHeaderResponse is used to create the default or can be used to create a custom response to the getHeader method
func (*Relay) MakeGetPayloadResponse ¶
func (m *Relay) MakeGetPayloadResponse(parentHash, blockHash, feeRecipient string, blockNumber uint64, version spec.DataVersion) *builderApi.VersionedSubmitBlindedBlockResponse
MakeGetPayloadResponse is used to create the default or can be used to create a custom response to the getPayload method
func (*Relay) OverrideHandleGetPayload ¶
func (m *Relay) OverrideHandleGetPayload(method func(w http.ResponseWriter, req *http.Request))
func (*Relay) OverrideHandleRegisterValidator ¶
func (m *Relay) OverrideHandleRegisterValidator(method func(w http.ResponseWriter, req *http.Request))