Skip to content

Commit

Permalink
enable uncle tests and fix uncle enpoint parameters (0xPolygonHermez#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tclemos authored Mar 20, 2023
1 parent 74963d9 commit dfb28a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 4 additions & 4 deletions jsonrpc/endpoints_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -787,25 +787,25 @@ func (e *EthEndpoints) Syncing() (interface{}, types.Error) {

// GetUncleByBlockHashAndIndex returns information about a uncle of a
// block by hash and uncle index position
func (e *EthEndpoints) GetUncleByBlockHashAndIndex() (interface{}, types.Error) {
func (e *EthEndpoints) GetUncleByBlockHashAndIndex(hash types.ArgHash, index types.Index) (interface{}, types.Error) {
return nil, nil
}

// GetUncleByBlockNumberAndIndex returns information about a uncle of a
// block by number and uncle index position
func (e *EthEndpoints) GetUncleByBlockNumberAndIndex() (interface{}, types.Error) {
func (e *EthEndpoints) GetUncleByBlockNumberAndIndex(number types.BlockNumber, index types.Index) (interface{}, types.Error) {
return nil, nil
}

// GetUncleCountByBlockHash returns the number of uncles in a block
// matching the given block hash
func (e *EthEndpoints) GetUncleCountByBlockHash() (interface{}, types.Error) {
func (e *EthEndpoints) GetUncleCountByBlockHash(hash types.ArgAddress) (interface{}, types.Error) {
return "0x0", nil
}

// GetUncleCountByBlockNumber returns the number of uncles in a block
// matching the given block number
func (e *EthEndpoints) GetUncleCountByBlockNumber() (interface{}, types.Error) {
func (e *EthEndpoints) GetUncleCountByBlockNumber(number types.BlockNumber) (interface{}, types.Error) {
return "0x0", nil
}

Expand Down
8 changes: 0 additions & 8 deletions jsonrpc/endpoints_eth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,6 @@ func TestGetL2BlockByNumber(t *testing.T) {
}

func TestGetUncleByBlockHashAndIndex(t *testing.T) {
// TODO: skipping not implemented func
t.Skip()
s, _, _ := newSequencerMockedServer(t)
defer s.Stop()

Expand All @@ -979,8 +977,6 @@ func TestGetUncleByBlockHashAndIndex(t *testing.T) {
}

func TestGetUncleByBlockNumberAndIndex(t *testing.T) {
// TODO: skipping not implemented func
t.Skip()
s, _, _ := newSequencerMockedServer(t)
defer s.Stop()

Expand All @@ -999,8 +995,6 @@ func TestGetUncleByBlockNumberAndIndex(t *testing.T) {
}

func TestGetUncleCountByBlockHash(t *testing.T) {
// TODO: skipping not implemented func
t.Skip()
s, _, _ := newSequencerMockedServer(t)
defer s.Stop()

Expand All @@ -1019,8 +1013,6 @@ func TestGetUncleCountByBlockHash(t *testing.T) {
}

func TestGetUncleCountByBlockNumber(t *testing.T) {
// TODO: skipping not implemented func
t.Skip()
s, _, _ := newSequencerMockedServer(t)
defer s.Stop()

Expand Down

0 comments on commit dfb28a1

Please sign in to comment.