Skip to content

Commit 8fbdd12

Browse files
committed
feat(hard_fork):optimize hard fork code
1 parent e2010e5 commit 8fbdd12

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

chainbase/src/main/java/org/tron/common/utils/ForkController.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ public class ForkController {
3838

3939
public void init(ChainBaseManager manager) {
4040
this.manager = manager;
41-
try {
42-
checkLocalVersion();
43-
} catch (RuntimeException r) {
44-
logger.warn("Exception caught, detail:{}", r.getMessage());
45-
System.exit(1);
46-
}
4741
}
4842

4943
public boolean pass(ForkBlockVersionEnum forkBlockVersionEnum) {
@@ -249,8 +243,8 @@ public void checkLocalVersion() {
249243
}
250244
}
251245
if (latestVersion > systemVersion) {
252-
throw new RuntimeException("Version check failed, latestVersion:"
253-
+ latestVersion + ", systemVersion:" + systemVersion);
246+
throw new RuntimeException("Version check failed, please upgrade to the latest version," +
247+
" latestVersion:" + latestVersion + ", systemVersion:" + systemVersion);
254248
}
255249
}
256250
}

0 commit comments

Comments
 (0)