Thu Aug 1 16:38:01 CST 2019 Source Update...

This commit is contained in:
2019-08-01 16:38:01 +08:00
parent 99967cb1d6
commit ea0bd38cae
8 changed files with 84 additions and 65 deletions

View File

@@ -8,7 +8,7 @@
* Telegram: https://t.me/terafoundation
*/
global.UPDATE_CODE_VERSION_NUM = 1167;
global.UPDATE_CODE_VERSION_NUM = 1171;
global.MIN_CODE_VERSION_NUM = 1114;
global.MINING_VERSION_NUM = 0;
global.InitParamsArg = InitParamsArg;
@@ -17,9 +17,9 @@ global.CONST_NAME_ARR = ["AUTO_CORRECT_TIME", "DELTA_CURRENT_TIME", "COMMON_KEY"
"WALLET_NAME", "WALLET_DESCRIPTION", "USE_API_WALLET", "USE_API_V1", "USE_HARD_API_V2", "COUNT_VIEW_ROWS", "USE_HINT", "ALL_VIEW_ROWS",
"ALL_LOG_TO_CLIENT", "LOG_LEVEL", "USE_MINING", "MINING_START_TIME", "MINING_PERIOD_TIME", "POW_MAX_PERCENT", "COUNT_MINING_CPU",
"SIZE_MINING_MEMORY", "POW_RUN_COUNT", "USE_AUTO_UPDATE", "RESTART_PERIOD_SEC", "MAX_GRAY_CONNECTIONS_TO_SERVER", "TRANSACTION_PROOF_COUNT",
"UPDATE_NUM_COMPLETE", "LIMIT_SEND_TRAFIC", "WATCHDOG_DEV", "ADDRLIST_MODE", "CheckPointDelta", "MIN_VER_STAT", "DEBUG_WALLET",
"HTTP_HOSTING_PORT", "HTTPS_HOSTING_DOMAIN", "HTTP_MAX_COUNT_ROWS", "HTTP_ADMIN_PASSWORD", "HTTP_START_PAGE", "WATCHDOG_BADACCOUNT",
"RESYNC_CONDITION", "MAX_CONNECTIONS_COUNT", "TRUST_PROCESS_COUNT", "REST_START_COUNT", "LOAD_TO_BEGIN", ];
"LIMIT_SEND_TRAFIC", "WATCHDOG_DEV", "ADDRLIST_MODE", "CheckPointDelta", "MIN_VER_STAT", "DEBUG_WALLET", "HTTP_HOSTING_PORT",
"HTTPS_HOSTING_DOMAIN", "HTTP_MAX_COUNT_ROWS", "HTTP_ADMIN_PASSWORD", "HTTP_START_PAGE", "WATCHDOG_BADACCOUNT", "RESYNC_CONDITION",
"MAX_CONNECTIONS_COUNT", "TRUST_PROCESS_COUNT", "REST_START_COUNT", "LOAD_TO_BEGIN", ];
global.MAX_LENGTH_SENDER_MAP = 3000;
global.DELTA_START_SENDER_MAP = 24;
global.NODES_DELTA_CALC_HOUR = 4;
@@ -35,7 +35,7 @@ global.WATCHDOG_BADACCOUNT = 1;
global.WATCHDOG_DEV = 0;
global.RESYNC_CONDITION = {"OWN_BLOCKS":20, "K_POW":5};
global.REST_BLOCK_SCALE = 1000;
global.REST_START_COUNT = 1000;
global.REST_START_COUNT = 10000;
global.LOAD_TO_BEGIN = 2;
global.DEBUG_WALLET = 0;
global.CHECK_GLOBAL_TIME = 1;
@@ -48,7 +48,6 @@ global.USE_NET_FOR_SERVER_ADDRES = 1;
global.NET_WORK_MODE = undefined;
global.STAT_MODE = 0;
global.MAX_STAT_PERIOD = 1 * 3600;
global.UPDATE_NUM_COMPLETE = 0;
global.WALLET_NAME = "TERA";
global.WALLET_DESCRIPTION = "";
global.USE_MINING = 0;

View File

@@ -29,13 +29,12 @@ ContenTypeMap["html"] = "text/html";
ContenTypeMap["txt"] = "text/plain";
ContenTypeMap["csv"] = "text/csv";
ContenTypeMap["svg"] = "image/svg+xml";
ContenTypeMap[""] = "application/octet-stream";
ContenTypeMap["zip"] = "application/zip";
ContenTypeMap["pdf"] = "application/pdf";
ContenTypeMap["exe"] = "application/octet-stream";
ContenTypeMap["msi"] = "application/octet-stream";
ContenTypeMap["woff"] = "application/font-woff";
ContenTypeMap["html"] = "text/html";
var DefaultContentType = "application/octet-stream";
ContenTypeMap["psd"] = "application/octet-stream";
global.HTTPCaller = {};
@@ -1453,8 +1452,8 @@ var MapFileHTML5 = {};
function SendWebFile(response,name,StrCookie,bParsing)
{
var type = name.substr(name.length - 4, 4);
if(type.substr(0, 1) === ".")
type = type.substr(1);
var index1 = type.indexOf(".");
type = type.substr(index1 + 1);
var Path;
if(name.substr(0, 2) !== "./")
Path = "./" + name;
@@ -1473,7 +1472,9 @@ function SendWebFile(response,name,StrCookie,bParsing)
return ;
}
var StrContentType = ContenTypeMap[type];
if(!StrContentType || StrContentType === "text/html")
if(!StrContentType)
StrContentType = DefaultContentType;
if(StrContentType === "text/html")
{
var Headers = {'Content-Type':'text/html', "X-Frame-Options":"sameorigin"};
if(StrCookie)
@@ -1700,7 +1701,7 @@ function SetSafeResponce(response)
{
try
{
if(arguments && arguments[0] && arguments[0].length)
if(global.STAT_MODE === 2 && arguments && arguments[0] && arguments[0].length)
{
ADD_TO_STAT("HTTP_SEND", arguments[0].length);
if(response.DetailStatName)