style: comment unused code and format
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
@@ -31,7 +31,7 @@ global.RBTree = require('bintrees').RBTree;
|
||||
global.ntpClient = require('ntp-client');
|
||||
global.Stun = require('stun');
|
||||
global.ZIP = require("zip");
|
||||
var strOS = os.platform() + "_" + os.arch();
|
||||
// var strOS = os.platform() + "_" + os.arch();
|
||||
if (!global.secp256k1) {
|
||||
global.secp256k1 = require('secp256k1');
|
||||
}
|
||||
@@ -56,16 +56,16 @@ global.GetCurrentBlockNumByTime = function GetCurrentBlockNumByTime() {
|
||||
return StartBlockNum;
|
||||
};
|
||||
global.DelDir = function(Path) {
|
||||
if (Path.substr(Path.length - 1, 1) === "/")
|
||||
if (Path.substr(Path.length - 1, 1) === "/") {
|
||||
Path = Path.substr(0, Path.length - 1);
|
||||
}
|
||||
if (fs.existsSync(Path)) {
|
||||
var arr = fs.readdirSync(Path);
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
var name = Path + "/" + arr[i];
|
||||
if (fs.statSync(name).isDirectory()) {
|
||||
global.DelDir(name);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (name.right(9) == "const.lst")
|
||||
continue;
|
||||
if (name.right(7) == "log.log")
|
||||
@@ -82,7 +82,7 @@ global.SliceArr = function(arr, start, end) {
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
var nRand = Math.floor(123 + Math.random() * 1000);
|
||||
// var nRand = Math.floor(123 + Math.random() * 1000);
|
||||
|
||||
function random(max) {
|
||||
return Math.floor(Math.random() * max);
|
||||
|
||||
Reference in New Issue
Block a user