Skip to content

Commit

Permalink
rpc: remove dead endpoint (ethereum#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
tynes authored Feb 18, 2021
1 parent 8084020 commit df2475d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ func (b *EthAPIBackend) SetHead(number uint64) {
b.eth.syncService.SetLatestL1BlockNumber(blockNumber.Uint64())
}

func (b *EthAPIBackend) SetL1Head(number uint64) error {
return b.eth.syncService.SetL1Head(number)
}

func (b *EthAPIBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) {
// Pending block is only known by the miner
if number == rpc.PendingBlockNumber {
Expand Down
4 changes: 0 additions & 4 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1984,10 +1984,6 @@ func (api *PrivateDebugAPI) SetHead(number hexutil.Uint64) {
api.b.SetHead(uint64(number))
}

func (api *PrivateDebugAPI) SetL1Head(number hexutil.Uint64) {
api.b.SetL1Head(uint64(number))
}

// PublicNetAPI offers network related RPC methods
type PublicNetAPI struct {
net *p2p.Server
Expand Down
1 change: 0 additions & 1 deletion internal/ethapi/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ type Backend interface {
IsSyncing() bool
GetEthContext() (uint64, uint64)
GetRollupContext() (uint64, uint64)
SetL1Head(number uint64) error
GasLimit() uint64

ChainConfig() *params.ChainConfig
Expand Down
4 changes: 0 additions & 4 deletions les/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ func (b *LesApiBackend) SetHead(number uint64) {
b.eth.blockchain.SetHead(number)
}

func (b *LesApiBackend) SetL1Head(number uint64) error {
panic("unimplemented")
}

func (b *LesApiBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) {
if number == rpc.LatestBlockNumber || number == rpc.PendingBlockNumber {
return b.eth.blockchain.CurrentHeader(), nil
Expand Down
6 changes: 0 additions & 6 deletions rollup/sync_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,6 @@ func (s *SyncService) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Sub
return s.scope.Track(s.txFeed.Subscribe(ch))
}

// TODO: This function needs to be rethought, its no longer
// easily possible to say "start syncing from L1 height x"
func (s *SyncService) SetL1Head(number uint64) error {
return nil
}

// maybeApplyTransaction will potentially apply the transaction after first
// inspecting the local database. This is mean to prevent transactions from
// being replayed.
Expand Down

0 comments on commit df2475d

Please sign in to comment.