This commit is contained in:
progr76@gmail.com 2019-04-07 18:09:59 +03:00
parent c49425621c
commit e2104b0fa6
24 changed files with 180 additions and 96 deletions

Binary file not shown.

Binary file not shown.

View File

@ -13,6 +13,55 @@ function $(id)
{
return document.getElementById(id);
};
if(!Math.log2)
Math.log2 = Math.log2 || function (x)
{
return Math.log(x) * Math.LOG2E;
};
if(!window.crypto)
window.crypto = window.msCrypto;
if(!window.toStaticHTML)
toStaticHTML = function (Str)
{
return Str;
};
if(!String.prototype.padStart)
{
window.BrowserIE = 1;
String.prototype.padStart = function padStart(targetLength,padString)
{
targetLength = targetLength >> 0;
padString = String((typeof padString !== 'undefined' ? padString : ' '));
if(this.length > targetLength)
{
return String(this);
}
else
{
targetLength = targetLength - this.length;
if(targetLength > padString.length)
{
padString += padString.repeat(targetLength / padString.length);
}
return padString.slice(0, targetLength) + String(this);
}
};
}
window.Storage = {};
window.Storage.setItem = function (Key,Value)
{
if(window.localStorage)
localStorage.setItem(Key, Value);
};
window.Storage.getItem = function (Key)
{
if(window.localStorage)
return localStorage.getItem(Key);
};
window.IsLocalClient = function ()
{
return (window.location.protocol.substr(0, 4) !== "http");
};
var ServerHTTP;
var MainServer;
if(window.nw)
@ -74,7 +123,7 @@ else
}
else
{
if(!window.location.hostname)
if(IsLocalClient())
return ;
}
}
@ -789,7 +838,7 @@ function SetGridData(arr,id_name,TotalSum,bclear,revert)
if(cell0.H)
{
var text = "" + cell0.F(Item);
text.trim();
text = toStaticHTML(text.trim());
if(cell.innerHTML !== text)
cell.innerHTML = text;
}
@ -873,7 +922,7 @@ function RetOpenDapps(Item,bNum,AccountNum)
if(Item.HTMLLength > 0)
{
var StrText = RetIconDapp(Item) + Name;
return '<button class="bt_open_dapp" style="margin: -2px 0 0 0" onclick="OpenDapps(' + Item.Num + ',' + AccountNum + ')">' + StrText + '</button>';
return '<button type="button" class="bt_open_dapp" style="margin: -2px 0 0 0" onclick="OpenDapps(' + Item.Num + ',' + AccountNum + ')">' + StrText + '</button>';
}
else
return RetIconDapp(Item) + Name;
@ -1059,7 +1108,7 @@ function LoadValuesByArr(Arr,DopStr)
{
if(!DopStr)
DopStr = "";
if(localStorage["VerSave"] !== "3")
if(Storage.getItem("VerSave") !== "3")
return 0;
for(var i = 0; i < Arr.length; i++)
{
@ -1067,9 +1116,9 @@ function LoadValuesByArr(Arr,DopStr)
var Item = document.getElementById(name);
var name2 = DopStr + name;
if(Item.type === "checkbox")
Item.checked = parseInt(localStorage.getItem(name2));
Item.checked = parseInt(Storage.getItem(name2));
else
Item.value = localStorage.getItem(name2);
Item.value = Storage.getItem(name2);
}
return 1;
};
@ -1078,16 +1127,16 @@ function SaveValuesByArr(Arr,DopStr)
{
if(!DopStr)
DopStr = "";
localStorage["VerSave"] = "3";
Storage.setItem("VerSave", "3");
for(var i = 0; i < Arr.length; i++)
{
var name = Arr[i];
var name2 = DopStr + name;
var Item = $(name);
if(Item.type === "checkbox")
window.localStorage.setItem(name2, 0 + Item.checked);
window.Storage.setItem(name2, 0 + Item.checked);
else
window.localStorage.setItem(name2, Item.value);
window.Storage.setItem(name2, Item.value);
}
};
var MapCurrency = {};
@ -1290,7 +1339,7 @@ function FillCategory(IdName)
function AddToInvoiceList(Item)
{
var arr;
var Str = localStorage["InvoiceList"];
var Str = Storage.getItem("InvoiceList");
if(Str)
{
arr = JSON.parse(Str);
@ -1300,13 +1349,13 @@ function AddToInvoiceList(Item)
arr = [];
}
arr.unshift(Item);
localStorage["InvoiceList"] = JSON.stringify(arr);
Storage.setItem("InvoiceList", JSON.stringify(arr));
};
function OpenDapps(Num,AccountNum)
{
var StrPath = '/dapp/' + Num;
if(window.location.protocol === "file:")
if(IsLocalClient())
{
StrPath = "./dapp-frame.html?dapp=" + Num;
}
@ -1587,7 +1636,7 @@ function GetSignTransaction(TR,StrPrivKey,F)
function GetSignFromArr(Arr,StrPrivKey)
{
if(!StrPrivKey)
StrPrivKey = localStorage["idPrivKey"];
StrPrivKey = Storage.getItem("idPrivKey");
if(!IsHexStr(StrPrivKey) || StrPrivKey.length !== 64)
return "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
var PrivKey = GetArrFromHex(StrPrivKey);
@ -1633,7 +1682,7 @@ Number.prototype.toStringF = function ()
function CanClientSign()
{
var StrPrivKey = localStorage["idPrivKey"];
var StrPrivKey = Storage.getItem("idPrivKey");
if(!IsHexStr(StrPrivKey) || StrPrivKey.length !== 64)
{
return 0;

View File

@ -35,10 +35,18 @@ function GetPowPower(arrhash)
var SumBit = 0;
for(var i = 0; i < arrhash.length; i++)
{
var CurSum = Math.clz32(arrhash[i]) - 24;
SumBit += CurSum;
if(CurSum !== 8)
break;
var byte = arrhash[i];
for(var b = 7; b >= 0; b--)
{
if((byte >> b) & 1)
{
return SumBit;
}
else
{
SumBit++;
}
}
}
return SumBit;
};
@ -265,9 +273,9 @@ function ComputeSecretWithCheck(PubKey,StrPrivKey,F)
function ComputeSecret(Account,PubKey,F)
{
if(localStorage["idPrivKey"])
if(Storage.getItem("idPrivKey"))
{
ComputeSecretWithCheck(PubKey, localStorage["idPrivKey"], F);
ComputeSecretWithCheck(PubKey, Storage.getItem("idPrivKey"), F);
}
else
{

View File

@ -11,6 +11,11 @@
var DiagramMap = {};
var DiagramMapId = {};
var LMouseOn = false;
if(!window.toStaticHTML)
toStaticHTML = function (Str)
{
return Str;
};
function Rigth(Str,Count)
{
@ -44,11 +49,11 @@ function SetHTMLDiagramItem(Item,width)
}
var ElBlock = document.getElementById("B" + Item.id);
if(ElBlock)
ElBlock.innerHTML = Str;
ElBlock.innerHTML = toStaticHTML(Str);
else
{
var diargams = document.getElementById("diargams");
diargams.innerHTML += "<DIV id='B" + Item.id + "'>" + Str + "</DIV>";
diargams.innerHTML = toStaticHTML(diargams.innerHTML + "<DIV id='B" + Item.id + "'>" + Str + "</DIV>");
}
};

View File

@ -285,7 +285,7 @@ function AddWhiteList()
{
var ToID = ParseNum($("idTo").value);
if(ToID && $("idWhiteOnSend").checked)
localStorage["White:" + ToID] = 1;
Storage.setItem("White:" + ToID, 1);
};
function SendMoneyBefore()
@ -294,7 +294,7 @@ function SendMoneyBefore()
return ;
var ToID = ParseNum($("idTo").value);
var Item = MapAccounts[ToID];
if(localStorage["White:" + ToID] || !$("idSumSend").value || Item && Item.MyAccount)
if(Storage.getItem("White:" + ToID) || !$("idSumSend").value || Item && Item.MyAccount)
{
SendMoney();
}
@ -530,7 +530,7 @@ function CheckSendList(bRedraw)
TitleWarning = PayList.length;
if(AttachItem)
TitleWarning++;
var Str = localStorage["InvoiceList"];
var Str = Storage.getItem("InvoiceList");
if(!Str && !bRedraw)
return ;
if(!bRedraw)
@ -544,7 +544,7 @@ function CheckSendList(bRedraw)
{
AddSendList(arr[i]);
}
localStorage["InvoiceList"] = "";
Storage.setItem("InvoiceList", "");
}
var idList = $("idSendList");
if(PayList.length)

View File

@ -43,7 +43,7 @@ function StartWebWallet()
function OnInitWebWallet()
{
var str = localStorage.getItem(NETWORK + "NodesArrayList");
var str = Storage.getItem(NETWORK + "NodesArrayList");
if(str)
{
var arr = JSON.parse(str);
@ -68,20 +68,23 @@ function SaveServerMap()
arr.push({ip:Item.ip, port:Item.port});
}
}
localStorage.setItem(NETWORK + "NodesArrayList", JSON.stringify(arr));
Storage.setItem(NETWORK + "NodesArrayList", JSON.stringify(arr));
};
function SetStatus(Str)
{
var id = $("idStatus");
id.innerHTML = Str;
console.log(id.innerText);
if(Str)
console.log(id.innerText);
};
function SetError(Str,bNoSound)
{
SetStatus("<DIV align='left' style='color:red'><B>" + Str + "</B></DIV>");
};
var CountConnect = 0;
var CountWallet = 0;
function ConnectWebWallet()
{
@ -92,6 +95,13 @@ function ConnectWebWallet()
var Item = ServerMap[key];
Item.SendHandShake = 0;
}
if(window.BrowserIE && !IsLocalClient())
{
MainServer = undefined;
return ;
}
CountConnect = 0;
CountWallet = 0;
SetStatus("Connecting...");
LoopHandShake();
setTimeout(LoopWalletInfo, 1500);
@ -107,6 +117,9 @@ function LoopHandShake()
var Item = ServerMap[key];
if(Item.SendHandShake || !Item.port)
continue;
CountConnect++;
if(window.BrowserIE && CountConnect > 4)
break;
DoNodeList(Item);
}
};
@ -155,6 +168,9 @@ function LoopWalletInfo()
var Item = ServerMap[key];
if(Item.port)
{
CountWallet++;
if(window.BrowserIE && CountWallet > 4)
break;
DoWalletInfo(Item);
}
}

View File

@ -15,6 +15,8 @@
<script>
window.Storage=window.localStorage;
var DapNumber="#template-number#";
var glSmart=parseInt(DapNumber);
var CONFIG_DATA={};
@ -62,12 +64,12 @@
}
case "setstorage":
{
localStorage.setItem("DAPP-"+DapNumber+"-"+Data.Key,JSON.stringify(Data.Value));
Storage.setItem("DAPP-"+DapNumber+"-"+Data.Key,JSON.stringify(Data.Value));
break;
}
case "getstorage":
{
Data.Value=localStorage.getItem("DAPP-"+DapNumber+"-"+Data.Key);
Data.Value=Storage.getItem("DAPP-"+DapNumber+"-"+Data.Key);
if(Data.Value)
Data.Value=JSON.parse(Data.Value);
SendMessage(Data);
@ -75,12 +77,12 @@
}
case "setcommon":
{
localStorage.setItem("DAPP-"+Data.Key,JSON.stringify(Data.Value));
Storage.setItem("DAPP-"+Data.Key,JSON.stringify(Data.Value));
break;
}
case "getcommon":
{
Data.Value=localStorage.getItem("DAPP-"+Data.Key);
Data.Value=Storage.getItem("DAPP-"+Data.Key);
if(Data.Value)
Data.Value=JSON.parse(Data.Value);
SendMessage(Data);
@ -129,7 +131,7 @@
AllData=1;
NumDappGet++;
var Key=localStorage["idPubKey"];
var Key=Storage.getItem("idPubKey");
GetData("DappInfo",{Smart:glSmart,Key:Key,Session:glSession,NumDappInfo:NumDappInfo,AllData:AllData,AllAccounts:Data.AllAccounts}, function (SetData)
{
if(SetData)
@ -153,8 +155,8 @@
if(!Data.PubKey)
{
//support web/light wallet mode:
Data.PubKey=localStorage["idPubKey"];
Data.WalletIsOpen=IsPrivateMode(localStorage["idPrivKey"]);
Data.PubKey=Storage.getItem("idPubKey");
Data.WalletIsOpen=IsPrivateMode(Storage.getItem("idPrivKey"));
Data.WalletCanSign=Data.WalletIsOpen;
}
CONFIG_DATA.WalletCanSign=Data.WalletCanSign;
@ -167,7 +169,7 @@
break;
}
case "DappWalletList":
var Key=localStorage["idPubKey"];
var Key=Storage.getItem("idPubKey");
Data.Params={Smart:glSmart,Key:Key};
case "DappSmartHTMLFile":
case "DappBlockFile":
@ -182,8 +184,8 @@
//check storage
var StrKeyStorage=Data.Params.BlockNum+"-"+Data.Params.TrNum;
var Storage=sessionStorage;
var SavedTextData=Storage[StrKeyStorage];
var Storage2=sessionStorage;
var SavedTextData=Storage2[StrKeyStorage];
if(SavedTextData)
{
var SetData=JSON.parse(SavedTextData);
@ -206,7 +208,7 @@
SendMessage(Data);
if(StrKeyStorage && SetData.result)
{
Storage[StrKeyStorage]=responseText;
Storage2[StrKeyStorage]=responseText;
}
}
});
@ -237,7 +239,11 @@
}
case "OpenLink":
{
window.open(Data.Message);
var Path=Data.Message.substr(0,200);
if(IsLocalClient() && Path.substr(0,6)==="/dapp/")
Path="?dapp="+Path.substr(6);
//console.log("OpenLink:"+Path);
window.open(Path);
break;
}
case "ComputeSecret":
@ -284,18 +290,18 @@
{
if(window.location.hash)
OPEN_PATH=window.location.hash.substr(1);
if(window.location.protocol==="file:")
if(IsLocalClient())
{
DapNumber=window.location.search.substr(6);
if(localStorage["MainServer"])
if(Storage.getItem("MainServer"))
{
MainServer=JSON.parse(localStorage["MainServer"]);
MainServer=JSON.parse(Storage.getItem("MainServer"));
}
}
glSmart=parseInt(DapNumber);
var Key=localStorage["idPubKey"];
var Key=Storage.getItem("idPubKey");
GetData("DappInfo",{Smart:glSmart, Key:Key, Session:glSession, AllData:1}, function (SetData)
{
if(!SetData || !SetData.result)
@ -414,7 +420,7 @@
StrRef='<A class="btcreate" href="./web-wallet.html#TabAccounts">Accounts</A>';
else
{
if(localStorage["BIGWALLET"])
if(Storage.getItem("BIGWALLET"))
StrRef='<A class="btcreate" href="/wallet.html#TabAccounts">Config</A>'
else
StrRef='<A class="btcreate" href="/web-wallet.html#TabAccounts">Accounts</A>';
@ -480,9 +486,9 @@
var arr = new Uint8Array(32);
window.crypto.getRandomValues(arr);
var PrivKey=GetHexFromArr(sha3(arr));
localStorage["idPrivKey"]=PrivKey;
localStorage["idPubKey"]=GetHexFromArr(SignLib.publicKeyCreate(PrivKey,1));
CONFIG_DATA.PubKey=localStorage["idPubKey"];
Storage.setItem("idPrivKey",PrivKey);
Storage.setItem("idPubKey",GetHexFromArr(SignLib.publicKeyCreate(PrivKey,1)));
CONFIG_DATA.PubKey=Storage.getItem("idPubKey");
console.log("CreateNewWebKeys: "+CONFIG_DATA.PubKey);
}
@ -492,7 +498,7 @@
{
if(!CONFIG_DATA.WalletCanSign)
{
if(localStorage["BIGWALLET"])
if(Storage.getItem("BIGWALLET"))
{
SetError("Pls, open wallet");
return;
@ -533,14 +539,14 @@
top: 0;
left: 0;
width: 100%;
height:20px;
height:18px;
padding: 0;
margin: 0;
background-color:white;
}
.btcreate
{
height:20px;
height:18px;
background-color: #347867;
color: white;
cursor: pointer;
@ -558,18 +564,12 @@
</html>
<script>
var glDebugPath="";
// glDebugPath="./dapp-smart/forum.html";
//glDebugPath="./dapp-smart/DEX.html";
//glDebugPath="./dapp-smart/test-load.html";
// glDebugPath="./dapp-smart/gambling-1.html";
// glDebugPath="./dapp-smart/BTC-coin.html";
// glDebugPath="./dapp-smart/freeze.html";
// glDebugPath="./dapp-smart/promise.html";
//glDebugPath="./dapp-smart/forum.html";
//glDebugPath="./dapp-smart/DEX.html";
//glDebugPath="./dapp-smart/OnlineStore.html";
//glDebugPath="./dapp-smart/Clicker.html";
//{"HTMLBlock":3492141,"HTMLTr":0}
//glDebugPath="./dapp-smart/BTC-coin.html";
//glDebugPath="./dapp-smart/static/miner-list.html";
//glDebugPath="./dapp-smart/static/ReadAccountArr.html";
//{"HTMLBlock":24201380,"HTMLTr":0}
</script>

View File

@ -764,7 +764,8 @@
{
CurTabName=name;
OnSelectTab(name);
window.location.hash="#"+name;
history.pushState(null,null,"#"+name);
//window.location.hash="#"+name;
SetVisibleTab();
SaveValues();
@ -1483,7 +1484,7 @@
<td>Amount</td>
<td>
<INPUT type="number" id="idSumSend" style="color:#1e21cb" value="" step=0 min=0 max=1000000000 onkeyup="OnEditTransactionFields()" onchange="OnEditTransactionFields()">&nbsp;
<button style="font-family: monospace;" onclick="SetAllSum()"><-</button>
<button style="font-family: monospace;" onclick="SetAllSum()"></button>
<B id="idCoinName"></B>
</td>
</tr>

View File

@ -41,7 +41,7 @@
{
LoadSignLib();
if(localStorage["NETWORK"] || window.location.protocol==="file:")
if(localStorage["NETWORK"] || IsLocalClient())
{
OnLoad();
}
@ -914,7 +914,7 @@
<td>数量</td>
<td>
<INPUT type="number" id="idSumSend" style="color:#1e21cb" value="" step=0 min=0 max=1000000000 oninput="OnEditTransactionFields()">&nbsp;
<button style="font-family: monospace;" onclick="SetAllSum()"><-</button>
<button style="font-family: monospace;" onclick="SetAllSum()"></button>
<B id="idCoinName"></B>
</td>
</tr>

View File

@ -22,13 +22,15 @@
<script>
// window.WEBWALLET=1;
var PubKeyStr;
var NumAccountList=0;
//Pagination
var SaveIdArr=["idAccount","idTo","idSumSend","idDescription","idCurTabName","idPubKey","idPrivKey","idViewBlockNum","idViewAccountNum","idViewDappNum"];
var CONFIG_DATA={};
CONFIG_DATA={PRICE_DAO:{NewAccount:10}};
var CONFIG_DATA={PRICE_DAO:{NewAccount:10},MaxNumBlockDB:0,MaxAccID:0,MaxDappsID:0};
var CountViewRows=20;
var DefAccounts={BlockName:"idPaginationAccount", NumName:"idViewAccountNum", TabName:"explorer_accounts",APIName:"GetAccountList"};
var DefBlock={BlockName:"idPaginationBlock", NumName:"idViewBlockNum", TabName:"explorer_blocks",APIName:"GetBlockList"};
@ -41,7 +43,7 @@
{
LoadSignLib();
if(localStorage["NETWORK"] || window.location.protocol==="file:")
if(Storage.getItem("NETWORK") || IsLocalClient())
{
OnLoad();
}
@ -51,7 +53,7 @@
{
if(Data && Data.result)
{
localStorage["NETWORK"]=Data.NETWORK;
Storage.setItem("NETWORK",Data.NETWORK);
console.log("Default network: "+Data.NETWORK);
OnLoad();
@ -62,8 +64,8 @@
function OnLoad()
{
if(localStorage["NETWORK"])
NETWORK=localStorage["NETWORK"];
if(Storage.getItem("NETWORK"))
NETWORK=Storage.getItem("NETWORK");
@ -105,7 +107,7 @@
{
NETWORK="TERA-TEST2";
}
localStorage["NETWORK"]=NETWORK;
Storage.setItem("NETWORK",NETWORK);
StartWebWallet();
UpdatesExplorerData();
@ -118,11 +120,11 @@
if(!MainServer)
{
SetStatus("Server not found");
delete localStorage["MainServer"];
Storage.setItem("MainServer",undefined);
return;
}
localStorage["MainServer"]=JSON.stringify(MainServer);//for use in dapp
Storage.setItem("MainServer",JSON.stringify(MainServer));//for use in dapp
//currency fill
FillCurrencyAsync("idAccountCur");
@ -161,7 +163,9 @@
SetVisibleTab();
SaveValues();
OnSelectTab(name);
window.location.hash="#"+name;
if(history.pushState)
history.pushState(null,null,"#"+name);
}
function OnSelectTab(name)
{
@ -264,7 +268,7 @@
{
Str="OK. Using Private key.";
}
$("idPrivKeyButton").innerHTML=Str;
$("idPrivKeyButton").innerHTML=toStaticHTML(Str);
}
if(EditFlag)
@ -421,7 +425,7 @@
var StrVersion=" 0."+Data.VersionNum;
var Str="Blockchain height: <B>"+Data.MaxNumBlockDB+"</B> Current create: <B>"+Data.CurBlockNum+"</B> Wallet ver:"+"<B>"+StrVersion+"</B>";
$("idCurrentBlockNum").innerHTML=Str;
$("idCurrentBlockNum").innerHTML=toStaticHTML(Str);
SetArrLog(Data.ArrLog);
@ -527,7 +531,7 @@
background-color: #22547f;
margin: 0;
padding: 0;
height: 34px;
height: 24px;
}
.bttab
{
@ -538,7 +542,7 @@
width: 100%;
margin: 0;
padding-top: 7px;
height: 100%;
height: 24px;
border: 1px solid white;
}
.bttab:hover
@ -666,6 +670,7 @@
{
text-align: left;
width: 90px;
min-width: 90px;
font-size: small;
}
td.hash
@ -807,7 +812,7 @@
<th><DIV id="MTabExplorer" onclick="SelectTab('TabExplorer')" class="bttab">EXPLORER</DIV></th>
</tr>
</table>
<table><tr><td><DIV id="idStatus">&nbsp;</DIV></td><td><button id="idNetwork" onclick="ChangeNetwork()"></button></td></tr></table>
<table><tr><td><DIV id="idStatus">&nbsp;</DIV></td><td><button id="idNetwork" style="height: 24px;" onclick="ChangeNetwork()"></button></td></tr></table>
<DIV id="TabLogo" style="display: block;">
@ -914,7 +919,7 @@
<td>Amount</td>
<td>
<INPUT type="number" id="idSumSend" style="color:#1e21cb" value="" step=0 min=0 max=1000000000 oninput="OnEditTransactionFields()">&nbsp;
<button style="font-family: monospace;" onclick="SetAllSum()"><-</button>
<button style="font-family: monospace;" onclick="SetAllSum()"></button>
<B id="idCoinName"></B>
</td>
</tr>

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -149,7 +149,7 @@
<h2 class="title">关于 TERA泰瑞</h2>
</div>
<p style="text-align: center;">
<img src="../PIC/Tera_Logo.png" align="center" width="240" />
<img src="../PIC/TERA_logo-03.png" align="center" width="240" />
</p>
<p style="text-align: justify; font-size: 15px;">
非常荣幸邀请您加入TERA挖矿。现有加密货币在以下方面存在问题中心化、交易吞吐量、交易速度、确认时间、交易税费以及一般可用性、难以整合到现有支付系统和金融系统。TERA提供了针对以上问题的解决方案。

View File

@ -218,7 +218,7 @@
<h2 class="title">Über TERA</h2>
</div>
<p style="text-align: center;">
<img src="../PIC/Tera_Logo.png" align="center" width="240" />
<img src="../PIC/TERA_logo-03.png" align="center" width="240" />
</p>
<p style="text-align: justify; font-size: 15px;">
Wir freuen uns darüber dich auf unserer Website begrüßen zu dürfen. Mit TERA möchten wir den Menschen das Thema Blockchain und dezentralisierte Apps (dApps) auf eine neue, einfachere und vor allem, im Sinne der Dezentralisierung, richtige Weise näher bringen. TERA vereint alle erforderlichen Eigenschaften, um bereits bekannte Technologien abzulösen und die Krypto Welt zu revolutionieren.

View File

@ -149,7 +149,7 @@
<h1>О TERA</h1>
</div>
<p class="tera-logo-panel">
<img src="../PIC/Tera_Logo.png" width="240" />
<img src="../PIC/TERA_logo-03.png" width="240" />
</p>
<p>
Рады предложить вам присоединиться к проекту TERA. Блокчейн TERA предлагает решения самых популярных проблем в области криптовалют: централизация, пропусканая способность, скорость осуществления транзакций, время подтверждения, комиссия за транзакции и общее удобство использования функционала рынка.

View File

@ -8,8 +8,8 @@
* Telegram: https://web.telegram.org/#/im?p=@terafoundation
*/
global.UPDATE_CODE_VERSION_NUM = 993;
global.MIN_CODE_VERSION_NUM = 922;
global.UPDATE_CODE_VERSION_NUM = 995;
global.MIN_CODE_VERSION_NUM = 992;
global.MINING_VERSION_NUM = 3;
global.InitParamsArg = InitParamsArg;
global.CONST_NAME_ARR = ["AUTO_CORRECT_TIME", "DELTA_CURRENT_TIME", "COMMON_KEY", "NODES_NAME", "SERVER_PRIVATE_KEY_HEX", "USE_NET_FOR_SERVER_ADDRES",

View File

@ -496,7 +496,7 @@ class SmartApp extends require("./dapp")
if(global.LOCAL_RUN || global.TEST_NETWORK)
this.RowHole = {}
else
this.RowHole = {"19":1, "22":1, "23":1, "24":1, "26":1, "27":1, "29":1, "30":1, "34":1}
this.RowHole = {"19":1, "22":1, "23":1, "24":1, "26":1, "27":1, "29":1, "30":1, "34":1, "56":1, "57":1}
}
IsHole(num)
{

View File

@ -35,8 +35,9 @@ setTimeout(function ()
global.glCurNumFindArr = 0;
global.ArrReconnect = [];
global.ArrConnect = [];
var FindList = [{"ip":"149.154.70.158", "port":30000}, {"ip":"69.30.225.26", "port":30000}, {"ip":"185.240.243.182", "port":30000},
{"ip":"212.109.197.205", "port":30000}, {"ip":"212.109.197.209", "port":30000}, {"ip":"80.87.192.24", "port":30000}, ];
var FindList = [{"ip":"91.235.136.81", "port":30005}, {"ip":"149.154.70.158", "port":30000}, {"ip":"69.30.225.26", "port":30000},
{"ip":"185.240.243.182", "port":30000}, {"ip":"212.109.197.205", "port":30000}, {"ip":"212.109.197.209", "port":30000}, {"ip":"80.87.192.24",
"port":30000}, ];
if(global.LOCAL_RUN)
{
FindList = [{"ip":"127.0.0.1", "port":50001}, {"ip":"127.0.0.1", "port":50002}];
@ -226,6 +227,7 @@ function StartChildProcess(Item)
}
catch(e)
{
ToLog("ERR KILL");
return ;
}
ITEM.Worker = undefined;
@ -236,6 +238,8 @@ function StartChildProcess(Item)
ITEM.LastAlive = (Date.now()) + ITEM.PeriodAlive * 3;
ToLog("STARTING " + ITEM.Name);
ITEM.Worker = Fork(ITEM.Path, ["READONLYDB"]);
ITEM.pid = ITEM.Worker.pid;
ToLog("STARTED " + ITEM.Name + ":" + ITEM.pid);
ITEM.Worker.on('message', function (msg)
{
if(ITEM.LastAlive < Date.now())
@ -319,12 +323,10 @@ function StartChildProcess(Item)
ITEM.Worker.on('error', function (err)
{
ToError("ERROR IN " + ITEM.Name + " Err : " + err);
ITEM.Worker = undefined;
});
ITEM.Worker.on('close', function (code)
{
ToError("CLOSE " + ITEM.Name);
ITEM.Worker = undefined;
});
}
}

View File

@ -846,10 +846,8 @@ catch(e)
}
global.LoadBlockFromNetwork = function (Params,F)
{
ToLog("RUN: LoadBlockFromNetwork:" + Params.BlockNum);
process.RunRPC("LoadBlockFromNetwork", {BlockNum:Params.BlockNum, F:1}, function (Err,Block)
{
ToLog("RETURN: LoadBlockFromNetwork: " + Params.BlockNum);
F(Err, Block);
});
};