Skip to content

Commit b8702a5

Browse files
committed
solve sonar problem
1 parent 436ab69 commit b8702a5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

chainbase/src/main/java/org/tron/core/store/AccountStore.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
@Component
2525
public class AccountStore extends TronStoreWithRevoking<AccountCapsule> {
2626

27+
private static String ACCOUNT_BLACKHOLE = "Blackhole";
28+
2729
private static Map<String, byte[]> assertsAddress = new HashMap<>(); // key = name , value = address
2830

2931
@Autowired
@@ -51,7 +53,7 @@ public static void setAccount(com.typesafe.config.Config config) {
5153
byte[] address = Commons.decodeFromBase58Check(obj.get("address").unwrapped().toString());
5254
assertsAddress.put(accountName, address);
5355
}
54-
if (assertsAddress.get("Blackhole") == null) {
56+
if (assertsAddress.get(ACCOUNT_BLACKHOLE) == null) {
5557
throw new TronError("Account[Blackhole] is not configured.", TronError.ErrCode.GENESIS_BLOCK_INIT);
5658
}
5759
}
@@ -113,12 +115,12 @@ public AccountCapsule getSun() {
113115
* Min TRX account.
114116
*/
115117
public AccountCapsule getBlackhole() {
116-
return getUnchecked(assertsAddress.get("Blackhole"));
118+
return getUnchecked(assertsAddress.get(ACCOUNT_BLACKHOLE));
117119
}
118120

119121

120122
public byte[] getBlackholeAddress() {
121-
return assertsAddress.get("Blackhole");
123+
return assertsAddress.get(ACCOUNT_BLACKHOLE);
122124
}
123125

124126
/**

0 commit comments

Comments
 (0)