Skip to content

Commit

Permalink
remove unnecessary interface
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Jun 12, 2023
1 parent 1c890cb commit c9bf93b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions blockindex/contractstaking/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/pkg/errors"

"github.com/iotexproject/iotex-core/blockchain/block"
"github.com/iotexproject/iotex-core/blockchain/blockdao"
"github.com/iotexproject/iotex-core/db"
)

Expand All @@ -24,25 +23,6 @@ const (
)

type (
// ContractIndexer defines the interface of contract staking reader
ContractIndexer interface {
blockdao.BlockIndexerWithStart

// CandidateVotes returns the total staked votes of a candidate
// candidate identified by owner address
CandidateVotes(ownerAddr address.Address) *big.Int
// Buckets returns active buckets
Buckets() ([]*Bucket, error)
// BucketsByIndices returns active buckets by indices
BucketsByIndices([]uint64) ([]*Bucket, error)
// BucketsByCandidate returns active buckets by candidate
BucketsByCandidate(ownerAddr address.Address) ([]*Bucket, error)
// TotalBucketCount returns the total number of buckets including burned buckets
TotalBucketCount() uint64
// BucketTypes returns the active bucket types
BucketTypes() ([]*BucketType, error)
}

// Indexer is the contract staking indexer
// Main functions:
// 1. handle contract staking contract events when new block comes to generate index data
Expand Down
2 changes: 1 addition & 1 deletion chainservice/chainservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type ChainService struct {
candidateIndexer *poll.CandidateIndexer
candBucketsIndexer *staking.CandidatesBucketsIndexer
sgdIndexer blockindex.SGDRegistry
contractStakingIndexer contractstaking.ContractIndexer
contractStakingIndexer *contractstaking.Indexer
registry *protocol.Registry
nodeInfoManager *nodeinfo.InfoManager
apiStats *nodestats.APILocalStats
Expand Down

0 comments on commit c9bf93b

Please sign in to comment.