@@ -11,6 +11,15 @@
|
||||
var MAX_SUM_TER = 1e9;
|
||||
var MAX_SUM_CENT = 1e9;
|
||||
|
||||
function CHECKSUM(Coin)
|
||||
{
|
||||
if(typeof Coin.SumCOIN !== "number")
|
||||
Coin.SumCOIN = 0;
|
||||
if(typeof Coin.SumCENT !== "number")
|
||||
Coin.SumCENT = 0;
|
||||
};
|
||||
|
||||
|
||||
function ADD(Coin,Value2)
|
||||
{
|
||||
Coin.SumCOIN += Value2.SumCOIN;
|
||||
@@ -102,6 +111,7 @@ function COIN_FROM_STRING(Str)
|
||||
};
|
||||
if(typeof global === "object")
|
||||
{
|
||||
global.CHECKSUM = CHECKSUM;
|
||||
global.ADD = ADD;
|
||||
global.SUB = SUB;
|
||||
global.DIV = DIV;
|
||||
|
||||
@@ -135,6 +135,15 @@ window.GetCurrentBlockNumByTime = function ()
|
||||
return 0;
|
||||
};
|
||||
|
||||
function SetMinPow()
|
||||
{
|
||||
var item = $("idDeltaPow");
|
||||
if(item)
|
||||
{
|
||||
window.DELTA_POWER_POW_TR = ParseNum(item.value);
|
||||
}
|
||||
};
|
||||
|
||||
function GetBlockNumTr(arr)
|
||||
{
|
||||
var BlockNum = window.DELTA_FOR_TIME_TX + GetCurrentBlockNumByTime();
|
||||
@@ -153,6 +162,7 @@ var LastCreatePOWHash = [255, 255, 255, 255];
|
||||
|
||||
function CreateHashBodyPOWInnerMinPower(arr,MinPow,startnonce)
|
||||
{
|
||||
SetMinPow();
|
||||
var TrType = arr[0];
|
||||
var BlockNum = GetBlockNumTr(arr);
|
||||
if(MinPow === undefined)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
var SaveIdArr=["idAccount","idTo","idSumSend","idDescription","idSelStyle",
|
||||
"idViewAccountNum","idViewBlockNum","idViewActNum","idViewHashNum","idViewDappNum",
|
||||
"idRunText","idViewAccountFilter",
|
||||
"idBlockCount","idPeriodAutoCheckPoint"];
|
||||
"idBlockCount","idPeriodAutoCheckPoint","idDeltaPow"];
|
||||
|
||||
|
||||
var MaxAccID=0;
|
||||
@@ -1730,6 +1730,7 @@
|
||||
<BR>
|
||||
<INPUT type="button" onclick="SignJSON()" class="btdoit bt" value="Sign JSON" id="idSignJSON">
|
||||
<INPUT type="button" onclick="SendMoneyJSON()" class="btdoit bt" value="Send from JSON">
|
||||
Pow:<INPUT type="number" id="idDeltaPow" style="width: 60px" value="" onchange="SetMinPow()">
|
||||
</DIV>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user