This commit is contained in:
progr76@gmail.com
2019-02-21 17:31:48 +03:00
parent 501ea7c584
commit 572a61a6a6
35 changed files with 4230 additions and 95 deletions

View File

@@ -937,6 +937,11 @@ function RetChangeSmart(Item)
return '<DIV style="width: 204px;">' + Name + '<button onclick="ChangeSmart(' + Item.Num + ',' + Item.Value.Smart + ')" class="setsmart" style="height: ' + Height + 'px;min-height: ' + Height + 'px;">Set</button>' + State + '</DIV>';
};
function RetHistoryAccount(Item)
{
return "<a class='olink' target='_blank' href='./history.html#" + Item.Num + "'>" + Item.Num + "</a>";
};
function RetBaseAccount(Item)
{
var Str = "" + Item.Account;
@@ -947,10 +952,10 @@ function RetBaseAccount(Item)
function ViewTransaction(BlockNum)
{
window.Open('/HTML/blockviewer.html#' + BlockNum, 'viewer', 800, 800);
window.Open('./blockviewer.html#' + BlockNum, 'viewer', 800, 800);
};
function DateFromBlock(BlockNum)
function DateFromBlock(BlockNum,bAddEnter)
{
var Str;
if(window.FIRST_TIME_BLOCK)
@@ -959,6 +964,11 @@ function DateFromBlock(BlockNum)
Str = now.toISOString();
Str = Str.substr(0, Str.indexOf("."));
Str = Str.replace("T", " ");
if(bAddEnter)
{
var Arr = Str.split(" ");
Str = Arr[0] + "\n" + Arr[1];
}
}
else
Str = "";

View File

@@ -396,12 +396,15 @@ function GetBlockArrFromBuffer(BufRead,Info)
Block.SeqHash = GetSeqHash(Block.BlockNum, Block.PrevHash, Block.TreeHash);
var PrevHashNum = ReadUint32FromArr(Block.PrevHash, 28);
var PrevAddrNum = ReadUint32FromArr(Block.AddrHash, 28);
if(PrevHashNum !== PrevAddrNum && global.WATCHDOG_DEV)
if(PrevHashNum !== PrevAddrNum && Block.BlockNum > 20000000)
{
var Str = "";
if(Info && Info.Node)
Str = " from " + NodeName(Info.Node);
ToError("Error on block load: " + Block.BlockNum + Str);
if(global.WATCHDOG_DEV)
{
var Str = "";
if(Info && Info.Node)
Str = " from " + NodeName(Info.Node);
ToError("Error on block load: " + Block.BlockNum + Str);
}
return [];
}
CalcHashBlockFromSeqAddr(Block, Block.PrevHash);