Mon Aug 26 14:20:28 CST 2019 Source Update...
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Telegram: https://t.me/terafoundation
|
||||
*/
|
||||
|
||||
global.UPDATE_CODE_VERSION_NUM = 1188;
|
||||
global.UPDATE_CODE_VERSION_NUM = 1194;
|
||||
global.MIN_CODE_VERSION_NUM = 1114;
|
||||
global.MINING_VERSION_NUM = 0;
|
||||
global.InitParamsArg = InitParamsArg;
|
||||
@@ -20,6 +20,7 @@ global.CONST_NAME_ARR = ["AUTO_CORRECT_TIME", "DELTA_CURRENT_TIME", "COMMON_KEY"
|
||||
"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.UPDATE_CODE_1 = 36000000;
|
||||
global.MAX_LENGTH_SENDER_MAP = 3000;
|
||||
global.DELTA_START_SENDER_MAP = 24;
|
||||
global.NODES_DELTA_CALC_HOUR = 4;
|
||||
@@ -169,6 +170,7 @@ if(global.LOCAL_RUN)
|
||||
global.MIN_POWER_POW_TR = 0;
|
||||
global.AUTO_CORRECT_TIME = 0;
|
||||
global.CHECK_GLOBAL_TIME = 0;
|
||||
global.UPDATE_CODE_1 = 0;
|
||||
}
|
||||
else
|
||||
if(global.TEST_NETWORK)
|
||||
@@ -204,6 +206,7 @@ else
|
||||
global.REST_START_COUNT = 10000;
|
||||
global.LOAD_TO_BEGIN = 2;
|
||||
global.START_BAD_ACCOUNT_CONTROL = 3105000;
|
||||
global.UPDATE_CODE_1 = 3180000;
|
||||
}
|
||||
global.GetNetworkName = function ()
|
||||
{
|
||||
|
||||
@@ -398,7 +398,7 @@ HTTPCaller.DappInfo = function (Params,responce,ObjectOnly)
|
||||
}
|
||||
var Ret = {result:1, DELTA_CURRENT_TIME:DELTA_CURRENT_TIME, MIN_POWER_POW_TR:MIN_POWER_POW_TR, FIRST_TIME_BLOCK:FIRST_TIME_BLOCK,
|
||||
CONSENSUS_PERIOD_TIME:CONSENSUS_PERIOD_TIME, PRICE_DAO:PRICE_DAO(SERVER.BlockNumDB), NEW_SIGN_TIME:NEW_SIGN_TIME, Smart:Smart,
|
||||
Account:Account, ArrWallet:WLData.arr, ArrEvent:EArr, ArrLog:ArrLog, };
|
||||
Account:Account, NETWORK:global.NETWORK, ArrWallet:WLData.arr, ArrEvent:EArr, ArrLog:ArrLog, };
|
||||
if(global.WALLET)
|
||||
{
|
||||
Ret.WalletIsOpen = (WALLET.WalletOpen !== false);
|
||||
@@ -612,7 +612,8 @@ HTTPCaller.GetWalletInfo = function (Params)
|
||||
STAT_MODE:global.STAT_MODE, HTTPPort:global.HTTP_PORT_NUMBER, HTTPPassword:HTTP_PORT_PASSWORD, CONSTANTS:Constants, CheckPointBlockNum:CHECK_POINT.BlockNum,
|
||||
MiningAccount:global.GENERATE_BLOCK_ACCOUNT, CountMiningCPU:GetCountMiningCPU(), CountRunCPU:global.ArrMiningWrk.length, MiningPaused:global.MiningPaused,
|
||||
HashRate:HashRateOneSec, MIN_POWER_POW_TR:MIN_POWER_POW_TR, PRICE_DAO:PRICE_DAO(SERVER.BlockNumDB), NWMODE:global.NWMODE, PERIOD_ACCOUNT_HASH:PERIOD_ACCOUNT_HASH,
|
||||
MAX_ACCOUNT_HASH:DApps.Accounts.DBAccountsHash.GetMaxNum(), TXBlockNum:TXBlockNum, SpeedSignLib:global.SpeedSignLib, };
|
||||
MAX_ACCOUNT_HASH:DApps.Accounts.DBAccountsHash.GetMaxNum(), TXBlockNum:TXBlockNum, SpeedSignLib:global.SpeedSignLib, NETWORK:global.NETWORK,
|
||||
};
|
||||
if(Params.Account)
|
||||
Ret.PrivateKey = GetHexFromArr(WALLET.GetPrivateKey(WALLET.AccountMap[Params.Account]));
|
||||
else
|
||||
@@ -938,6 +939,7 @@ HTTPCaller.SaveConstant = function (SetObj)
|
||||
}
|
||||
SAVE_CONST(true);
|
||||
SERVER.DO_CONSTANT();
|
||||
WALLET.FindMyAccounts(1);
|
||||
if(!WasUpdate && global.USE_AUTO_UPDATE && CODE_VERSION.VersionNum && global.UPDATE_CODE_VERSION_NUM < CODE_VERSION.VersionNum)
|
||||
{
|
||||
SERVER.UseCode(CODE_VERSION.VersionNum, true);
|
||||
|
||||
@@ -101,7 +101,7 @@ function ToLogClient(Str,StrKey,bFinal)
|
||||
ToLogFile(file_name_log, Str);
|
||||
if(!StrKey)
|
||||
StrKey = "";
|
||||
ArrLogClient.push({text:GetStrOnlyTime() + " " + Str, key:StrKey, final:bFinal, });
|
||||
ArrLogClient.push({time:GetStrOnlyTime(), text:Str, key:StrKey, final:bFinal, });
|
||||
if(ArrLogClient.length > 13)
|
||||
ArrLogClient.shift();
|
||||
};
|
||||
|
||||
@@ -198,7 +198,7 @@ module.exports = class CNode
|
||||
if(Buf)
|
||||
{
|
||||
var Str = Buf.Data;
|
||||
if(Str && Str.substr(0, 24) === "WAIT_CONNECT_FROM_SERVER")
|
||||
if(Str && typeof Str === "string" && Str.substr(0, 24) === "WAIT_CONNECT_FROM_SERVER")
|
||||
{
|
||||
AddNodeInfo(NODE, "2. CLIENT OK POW")
|
||||
CloseSocket(SOCKET, "WAIT_CONNECT_FROM_SERVER")
|
||||
|
||||
@@ -13,8 +13,8 @@ require("../system/dapp");
|
||||
require("../system/accounts");
|
||||
require("../system/smart");
|
||||
require("../system/file");
|
||||
require("../system/messager");
|
||||
require("../system/names");
|
||||
require("../system/messager");
|
||||
if(global.PROCESS_NAME === "MAIN")
|
||||
{
|
||||
require("./wallet");
|
||||
|
||||
@@ -16,6 +16,7 @@ require("./crypto-library");
|
||||
const WalletPath = "WALLET";
|
||||
const DBRow = require("./db/db-row");
|
||||
const CONFIG_NAME = GetDataPath(WalletPath + "/config.lst");
|
||||
global.HIDDEN_ACC_PATH = GetDataPath(WalletPath + "/hidden.lst");
|
||||
class CApp
|
||||
{
|
||||
constructor()
|
||||
@@ -223,9 +224,10 @@ class CApp
|
||||
{
|
||||
if(IsZeroArr(this.PubKeyArr))
|
||||
return ;
|
||||
var HiddenMap = LoadParams(HIDDEN_ACC_PATH, {});
|
||||
if(bClean)
|
||||
this.AccountMap = {}
|
||||
DApps.Accounts.FindAccounts([this.PubKeyArr], this.AccountMap, 0)
|
||||
DApps.Accounts.FindAccounts([this.PubKeyArr], this.AccountMap, HiddenMap, 0)
|
||||
}
|
||||
GetAccountKey(Num)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user