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 interface defined in provider #3885

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions blockindex/contractstaking/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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"
"github.com/iotexproject/iotex-core/pkg/util/byteutil"
)
Expand All @@ -26,25 +25,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