This commit is contained in:
progr76@gmail.com
2019-02-26 04:55:33 +03:00
parent 5782e4c1ca
commit d436ca1710
34 changed files with 961 additions and 266 deletions

View File

@@ -26,8 +26,8 @@ if(typeof global === "object")
BLOCKNUM_ALGO2 = 0;
if(global.TEST_NETWORK)
{
BLOCKNUM_HASH_NEW = 1000;
global.BLOCKNUM_TICKET_ALGO = 1296300;
BLOCKNUM_HASH_NEW = 100;
BLOCKNUM_TICKET_ALGO = 0;
}
else
{

View File

@@ -300,9 +300,12 @@ function SendMoneyBefore()
}
else
{
var SumSend = $("idSumSend").value;
var StrTo = " to " + GetAccountText(Item, ToID);
$("idWhiteOnSend").checked = 0;
$("idOnSendText").innerText = "" + $("idSumSend").value + " " + $("idCoinName").innerText + StrTo;
$("idOnSendText").innerHTML = "<B style='color:#ff4534'>" + SumSend + "</B> " + $("idCoinName").innerText + StrTo;
if(SumSend >= 100000)
$("idOnSendText").innerHTML += "<BR><DIV style='color: yellow;'>WARNING: You are about to send a very large amount!</DIV>";
SetVisibleBlock("idBlockOnSend", 1);
SetImg(this, 'idBlockOnSend');
}

View File

@@ -8,7 +8,7 @@
* Telegram: https://web.telegram.org/#/im?p=@terafoundation
*/
var MIN_VERSION = 868;
var MIN_VERSION = 903;
var COUNT_BLOCK_PROOF = 300;
var MIN_SUM_POWER = COUNT_BLOCK_PROOF * 35;
var MainServer = undefined;
@@ -26,7 +26,7 @@ var ServerTestMap = {"127.0.0.1":{"ip":"127.0.0.1", "port":80, "Name":"LOCAL"},
function StartWebWallet()
{
if(NETWORK === "TERA-TEST")
if(NETWORK === "TERA-TEST2")
{
MIN_SUM_POWER = 0;
ServerMap = ServerTestMap;
@@ -113,18 +113,21 @@ function LoopHandShake()
function DoNodeList(Item)
{
console.log(GetProtocolServerPath(Item) + "/GetNodeList");
if(window.location.protocol === "https:" && Item.port !== 443)
return ;
if(Item.port === 443 && IsIPAddres(Item.ip))
return ;
SetStatus("Try: " + Item.ip + ":" + Item.port);
Item.SendHandShake = 1;
GetData(GetProtocolServerPath(Item) + "/GetNodeList", {}, function (Data)
{
if(Data && Data.result && Data.BlockChain && Data.VersionNum >= MIN_VERSION)
if(Data && Data.result && Data.NETWORK === NETWORK && Data.VersionNum >= MIN_VERSION)
{
ConnectedCount++;
Item.GetHandShake = 1;
Item.BlockChain = Data.BlockChain;
SetStatus("Get: " + Item.ip + ":" + Item.port);
var bWas = 0;
for(var i = 0; i < Data.arr.length; i++)
{
@@ -132,6 +135,7 @@ function DoNodeList(Item)
if(!ServerMap[Node.ip] && Node.port)
{
ServerMap[Node.ip] = Node;
console.log("New: " + Node.ip + ":" + Node.port);
bWas = 1;
}
}