Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused channel from Powchain Service #8368

Merged
merged 3 commits into from Jan 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions beacon-chain/powchain/log_processing_test.go
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
gethTypes "github.com/ethereum/go-ethereum/core/types"
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
"github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache"
"github.com/prysmaticlabs/prysm/beacon-chain/core/feed"
Expand Down Expand Up @@ -735,6 +734,5 @@ func newPowchainService(t *testing.T, eth1Backend *contracts.TestAccount, beacon
bConfig := params.MinimalSpecConfig()
bConfig.MinGenesisTime = 0
params.OverrideBeaconConfig(bConfig)
web3Service.headerChan = make(chan *gethTypes.Header)
return web3Service
}
5 changes: 0 additions & 5 deletions beacon-chain/powchain/service.go
Expand Up @@ -133,7 +133,6 @@ type Service struct {
processingLock sync.RWMutex
ctx context.Context
cancel context.CancelFunc
headerChan chan *gethTypes.Header
headTicker *time.Ticker
currHttpEndpoint string
httpEndpoints []string
Expand Down Expand Up @@ -195,7 +194,6 @@ func New(ctx context.Context, config *Web3ServiceConfig) (*Service, error) {
s := &Service{
ctx: ctx,
cancel: cancel,
headerChan: make(chan *gethTypes.Header),
httpEndpoints: endpoints,
currHttpEndpoint: currEndpoint,
latestEth1Data: &protodb.LatestETH1Data{
Expand Down Expand Up @@ -279,9 +277,6 @@ func (s *Service) Stop() error {
if s.cancel != nil {
defer s.cancel()
}
if s.headerChan != nil {
defer close(s.headerChan)
}
s.closeClients()
return nil
}
Expand Down