diff --git a/eth/catalyst/api_testing.go b/eth/catalyst/api_testing.go index 5d6d9de1a5..8586029468 100644 --- a/eth/catalyst/api_testing.go +++ b/eth/catalyst/api_testing.go @@ -28,22 +28,22 @@ import ( "github.com/ethereum/go-ethereum/rpc" ) -// TestingAPI implements the testing_ namespace. +// testingAPI implements the testing_ namespace. // It's an engine-API adjacent namespace for testing purposes. -type TestingAPI struct { +type testingAPI struct { eth *eth.Ethereum } func newTestingAPI(backend *eth.Ethereum) rpc.API { return rpc.API{ Namespace: "testing", - Service: &TestingAPI{backend}, + Service: &testingAPI{backend}, Version: "1.0", Authenticated: false, } } -func (api *TestingAPI) BuildBlockV1(parentHash common.Hash, payloadAttributes engine.PayloadAttributes, transactions *[]hexutil.Bytes, extraData *hexutil.Bytes) (*engine.ExecutionPayloadEnvelope, error) { +func (api *testingAPI) BuildBlockV1(parentHash common.Hash, payloadAttributes engine.PayloadAttributes, transactions *[]hexutil.Bytes, extraData *hexutil.Bytes) (*engine.ExecutionPayloadEnvelope, error) { if api.eth.BlockChain().CurrentBlock().Hash() != parentHash { return nil, errors.New("parentHash is not current head") } diff --git a/eth/catalyst/api_testing_test.go b/eth/catalyst/api_testing_test.go index 09978c8e2b..fd4d28d26a 100644 --- a/eth/catalyst/api_testing_test.go +++ b/eth/catalyst/api_testing_test.go @@ -46,7 +46,7 @@ func TestBuildBlockV1(t *testing.T) { currentNonce, _ := ethservice.APIBackend.GetPoolNonce(context.Background(), testAddr) tx, _ := types.SignTx(types.NewTransaction(currentNonce, testAddr, big.NewInt(1), params.TxGas, big.NewInt(params.InitialBaseFee*2), nil), types.LatestSigner(ethservice.BlockChain().Config()), testKey) - api := &TestingAPI{eth: ethservice} + api := &testingAPI{eth: ethservice} t.Run("buildOnCurrentHead", func(t *testing.T) { envelope, err := api.BuildBlockV1(parent.Hash(), attrs, nil, nil)