mirror of
https://gitee.com/BDWare/cp.git
synced 2025-01-10 01:44:08 +00:00
refactor: prune unused code
This commit is contained in:
parent
d70490b5fb
commit
a8abd53446
@ -264,9 +264,9 @@ public class DesktopEngine extends JSEngine {
|
||||
for (String topic : contractNode.events.keySet()) {
|
||||
compileEventFunction(topic, topic, contractNode.events.get(topic));
|
||||
}
|
||||
for (String log : contractNode.logs.keySet()) {
|
||||
String topic = HashUtil.sha3(contract.getID() + log);
|
||||
compileEventFunction(log, topic, contractNode.logs.get(log));
|
||||
for (String logName : contractNode.logs.keySet()) {
|
||||
String topic = HashUtil.sha3(contract.getID(), logName);
|
||||
compileEventFunction(logName, topic, contractNode.logs.get(logName));
|
||||
}
|
||||
for (ClassNode cn : contractNode.getClzs()) {
|
||||
try {
|
||||
|
@ -109,47 +109,19 @@ public class SyncMechUtil {
|
||||
}
|
||||
|
||||
public void clearAllFiles() {
|
||||
File file = new File(syncDir);
|
||||
if (file.isDirectory()) {
|
||||
String[] children = file.list();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
File temp = new File(file, children[i]);
|
||||
temp.delete();
|
||||
}
|
||||
cleanDirectory(syncDir);
|
||||
cleanDirectory(crDir);
|
||||
cleanDirectory(memoryDir);
|
||||
cleanDirectory(traceDir);
|
||||
cleanDirectory(transDir);
|
||||
}
|
||||
|
||||
file = new File(crDir);
|
||||
private void cleanDirectory(String path) {
|
||||
File file = new File(path);
|
||||
if (file.isDirectory()) {
|
||||
String[] children = file.list();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
File temp = new File(file, children[i]);
|
||||
temp.delete();
|
||||
}
|
||||
}
|
||||
|
||||
file = new File(memoryDir);
|
||||
if (file.isDirectory()) {
|
||||
String[] children = file.list();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
File temp = new File(file, children[i]);
|
||||
temp.delete();
|
||||
}
|
||||
}
|
||||
|
||||
file = new File(traceDir);
|
||||
if (file.isDirectory()) {
|
||||
String[] children = file.list();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
File temp = new File(file, children[i]);
|
||||
temp.delete();
|
||||
}
|
||||
}
|
||||
|
||||
file = new File(transDir);
|
||||
if (file.isDirectory()) {
|
||||
String[] children = file.list();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
File temp = new File(file, children[i]);
|
||||
for (String child : children) {
|
||||
File temp = new File(file, child);
|
||||
temp.delete();
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class ContractHandler extends MsgHandler implements Runnable {
|
||||
cb.onResult(result);
|
||||
}
|
||||
|
||||
@Description("get functionEvaluates ")
|
||||
@Description("get functionEvaluates")
|
||||
public void functionEvaluates(GetMessage msg, ResultCallback cb) {
|
||||
cb.onResult(cs.evaluatesAnalysis(msg.arg));
|
||||
}
|
||||
@ -137,7 +137,7 @@ public class ContractHandler extends MsgHandler implements Runnable {
|
||||
cb.onResult(cs.getMemorySet());
|
||||
}
|
||||
|
||||
@Description("get logType ")
|
||||
@Description("get logType")
|
||||
public void getLogType(GetMessage msg, ResultCallback cb) {
|
||||
cb.onResult(cs.getLogType(msg.arg));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user