77import org .tron .core .capsule .AssetIssueCapsule ;
88import org .tron .core .capsule .BlockCapsule ;
99import org .tron .core .capsule .TransactionCapsule ;
10- import org .tron .core .capsule .VotesCapsule ;
1110import org .tron .core .capsule .WitnessCapsule ;
1211import org .tron .core .db .api .index .Index ;
1312import org .tron .protos .Contract .AssetIssueContract ;
1413import org .tron .protos .Protocol .Account ;
1514import org .tron .protos .Protocol .Block ;
1615import org .tron .protos .Protocol .Transaction ;
17- import org .tron .protos .Protocol .Votes ;
1816import org .tron .protos .Protocol .Witness ;
1917
2018@ Slf4j
@@ -35,9 +33,6 @@ public class IndexHelper {
3533 @ Getter
3634 @ Resource
3735 private Index .Iface <AssetIssueContract > assetIssueIndex ;
38- @ Getter
39- @ Resource
40- private Index .Iface <Votes > votesIndex ;
4136
4237 private <T > void add (Index .Iface <T > index , byte [] bytes ) {
4338 index .add (bytes );
@@ -63,10 +58,6 @@ public void add(AssetIssueContract a) {
6358 add (assetIssueIndex , getKey (a ));
6459 }
6560
66- public void add (Votes v ) {
67- add (votesIndex , getKey (v ));
68- }
69-
7061 private <T > void update (Index .Iface <T > index , byte [] bytes ) {
7162 index .update (bytes );
7263 }
@@ -91,10 +82,6 @@ public void update(AssetIssueContract a) {
9182 update (assetIssueIndex , getKey (a ));
9283 }
9384
94- public void update (Votes v ) {
95- update (votesIndex , getKey (v ));
96- }
97-
9885 private <T > void remove (Index .Iface <T > index , byte [] bytes ) {
9986 index .remove (bytes );
10087 }
@@ -119,10 +106,6 @@ public void remove(AssetIssueContract a) {
119106 remove (assetIssueIndex , getKey (a ));
120107 }
121108
122- public void remove (Votes v ) {
123- remove (votesIndex , getKey (v ));
124- }
125-
126109 private byte [] getKey (Transaction t ) {
127110 return new TransactionCapsule (t ).getTransactionId ().getBytes ();
128111 }
@@ -142,8 +125,4 @@ private byte[] getKey(Account a) {
142125 private byte [] getKey (AssetIssueContract a ) {
143126 return new AssetIssueCapsule (a ).getName ().toByteArray ();
144127 }
145-
146- private byte [] getKey (Votes v ) {
147- return new VotesCapsule (v ).createDbKey ();
148- }
149128}
0 commit comments