@@ -123,26 +123,26 @@ func TestGetPutBucketIndex(t *testing.T) {
123123
124124 // put buckets and get
125125 for i , e := range tests {
126- _ , _ , err := csr .voterBucketIndices (e .voterAddr )
126+ _ , _ , err := csr .NativeBucketIndicesByVoter (e .voterAddr )
127127 if i == 0 {
128128 require .Equal (state .ErrStateNotExist , errors .Cause (err ))
129129 }
130- _ , _ , err = csr .candBucketIndices (e .candAddr )
130+ _ , _ , err = csr .NativeBucketIndicesByCandidate (e .candAddr )
131131 if i == 0 {
132132 require .Equal (state .ErrStateNotExist , errors .Cause (err ))
133133 }
134134
135135 // put voter bucket index
136136 require .NoError (csm .putVoterBucketIndex (e .voterAddr , e .index ))
137- bis , _ , err := csr .voterBucketIndices (e .voterAddr )
137+ bis , _ , err := csr .NativeBucketIndicesByVoter (e .voterAddr )
138138 require .NoError (err )
139139 bucketIndices := * bis
140140 require .Equal (e .voterIndexSize , len (bucketIndices ))
141141 require .Equal (bucketIndices [e .voterIndexSize - 1 ], e .index )
142142
143143 // put candidate bucket index
144144 require .NoError (csm .putCandBucketIndex (e .candAddr , e .index ))
145- bis , _ , err = csr .candBucketIndices (e .candAddr )
145+ bis , _ , err = csr .NativeBucketIndicesByCandidate (e .candAddr )
146146 require .NoError (err )
147147 bucketIndices = * bis
148148 require .Equal (e .candIndexSize , len (bucketIndices ))
@@ -152,7 +152,7 @@ func TestGetPutBucketIndex(t *testing.T) {
152152 for _ , e := range tests {
153153 // delete voter bucket index
154154 require .NoError (csm .delVoterBucketIndex (e .voterAddr , e .index ))
155- bis , _ , err := csr .voterBucketIndices (e .voterAddr )
155+ bis , _ , err := csr .NativeBucketIndicesByVoter (e .voterAddr )
156156 if e .voterIndexSize != indexSize {
157157 bucketIndices := * bis
158158 require .Equal (indexSize - e .voterIndexSize , len (bucketIndices ))
@@ -162,7 +162,7 @@ func TestGetPutBucketIndex(t *testing.T) {
162162
163163 // delete candidate bucket index
164164 require .NoError (csm .delCandBucketIndex (e .candAddr , e .index ))
165- bis , _ , err = csr .candBucketIndices (e .candAddr )
165+ bis , _ , err = csr .NativeBucketIndicesByCandidate (e .candAddr )
166166 if e .candIndexSize != indexSize {
167167 bucketIndices := * bis
168168 require .Equal (indexSize - e .candIndexSize , len (bucketIndices ))
0 commit comments