Skip to content
This repository was archived by the owner on Sep 14, 2024. It is now read-only.

Commit d84fe70

Browse files
committed
micro update
1 parent 7936e14 commit d84fe70

14 files changed

+619
-555
lines changed

masterpaskalform.pas

Lines changed: 96 additions & 96 deletions
Large diffs are not rendered by default.

mpblock.pas

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ implementation
7474
Procedure CrearBloqueCero();
7575
Begin
7676
BuildNewBlock(0,GenesysTimeStamp,'',adminhash,'');
77-
if G_Launching then AddLineToDebugLog('console','Block GENESYS (0) created.'); //'Block 0 created.'
77+
if G_Launching then ToLog('console','Block GENESYS (0) created.'); //'Block 0 created.'
7878
if G_Launching then OutText('✓ Block 0 created',false,1);
7979
End;
8080

@@ -132,14 +132,14 @@ implementation
132132
BeginPerformance('BuildNewBlock');
133133
if ((numero>0) and (Timestamp < lastblockdata.TimeEnd)) then
134134
begin
135-
AddLineToDebugLog('console','New block '+IntToStr(numero)+' : Invalid timestamp');
136-
AddLineToDebugLog('console','Blocks can not be added until '+TimestampToDate(GenesysTimeStamp));
135+
ToLog('console','New block '+IntToStr(numero)+' : Invalid timestamp');
136+
ToLog('console','Blocks can not be added until '+TimestampToDate(GenesysTimeStamp));
137137
errored := true;
138138
end;
139139
if TimeStamp > UTCTime+5 then
140140
begin
141-
AddLineToDebugLog('console','New block '+IntToStr(numero)+' : Invalid timestamp');
142-
AddLineToDebugLog('console','Timestamp '+IntToStr(TimeStamp)+' is '+IntToStr(TimeStamp-UTCTime)+' seconds in the future');
141+
ToLog('console','New block '+IntToStr(numero)+' : Invalid timestamp');
142+
ToLog('console','Timestamp '+IntToStr(TimeStamp)+' is '+IntToStr(TimeStamp-UTCTime)+' seconds in the future');
143143
errored := true;
144144
end;
145145
if not errored then
@@ -269,7 +269,7 @@ implementation
269269
PendingTXs := copy(IgnoredTrxs,0,length(IgnoredTrxs));
270270
EXCEPT on E:Exception do
271271
begin
272-
AddLineToDebugLog('exceps',FormatDateTime('dd mm YYYY HH:MM:SS.zzz', Now)+' -> '+'Error asigning pending to Ignored');
272+
ToLog('exceps',FormatDateTime('dd mm YYYY HH:MM:SS.zzz', Now)+' -> '+'Error asigning pending to Ignored');
273273
end;
274274
END; {TRY}
275275
SetLength(IgnoredTrxs,0);
@@ -382,7 +382,7 @@ implementation
382382
// Guardar bloque al disco
383383
if not GuardarBloque(FileName,BlockHeader,ListaOrdenes,PosReward,PosCount,PoSAddressess,
384384
MNsReward, MNsCount,MNsAddressess) then
385-
AddLineToDebugLog('exceps',FormatDateTime('dd mm YYYY HH:MM:SS.zzz', Now)+' -> '+'*****CRITICAL*****'+slinebreak+'Error building block: '+numero.ToString);
385+
ToLog('exceps',FormatDateTime('dd mm YYYY HH:MM:SS.zzz', Now)+' -> '+'*****CRITICAL*****'+slinebreak+'Error building block: '+numero.ToString);
386386

387387
SetNMSData('','','','','','');
388388
BuildNMSBlock := 0;
@@ -530,7 +530,7 @@ function GetBlockReward(BlNumber:int64):Int64;
530530
MemStr.SaveToFile(NombreArchivo);
531531
EXCEPT On E :Exception do
532532
begin
533-
AddLineToDebugLog('console','Error saving block to disk: '+E.Message);
533+
ToLog('console','Error saving block to disk: '+E.Message);
534534
result := false;
535535
end;
536536
END{Try};
@@ -554,7 +554,7 @@ function LoadBlockDataHeader(BlockNumber:integer):BlockHeaderData;
554554
MemStr.Read(Header, SizeOf(Header));
555555
EXCEPT ON E:Exception do
556556
begin
557-
AddLineToDebugLog('console','Error loading Header from block '+IntToStr(BlockNumber)+':'+E.Message);
557+
ToLog('console','Error loading Header from block '+IntToStr(BlockNumber)+':'+E.Message);
558558
end;
559559
END{Try};
560560
MemStr.Free;
@@ -672,7 +672,7 @@ function GetBlockTrxs(BlockNumber:integer):TBlockOrdersArray;
672672
SetLength(resultado,totalMNs+1);
673673
resultado[length(resultado)-1].address := IntToStr(MNReward);
674674
EXCEPT on E: Exception do // nothing, the block is not founded
675-
AddLineToDebugLog('exceps',FormatDateTime('dd mm YYYY HH:MM:SS.zzz', Now)+' -> '+'EXCEPTION on MNs file data:'+E.Message)
675+
ToLog('exceps',FormatDateTime('dd mm YYYY HH:MM:SS.zzz', Now)+' -> '+'EXCEPTION on MNs file data:'+E.Message)
676676
END; {TRY}
677677
MemStr.Free;
678678
Result := resultado;
@@ -689,7 +689,7 @@ function GetBlockTrxs(BlockNumber:integer):TBlockOrdersArray;
689689
blocknumber:= MyLastBlock;
690690
if BlockNumber < Highest then
691691
begin
692-
AddLineToDebugLog('Console','Can not undo block '+mylastblock.ToString);
692+
ToLog('Console','Can not undo block '+mylastblock.ToString);
693693
exit;
694694
end
695695
else Highest := BlockNumber;
@@ -729,10 +729,10 @@ function GetBlockTrxs(BlockNumber:integer):TBlockOrdersArray;
729729
MyLastBlockHash := HashMD5File(BlockDirectory+IntToStr(MyLastBlock)+'.blk');
730730
LastBlockData := LoadBlockDataHeader(MyLastBlock);
731731
MyResumenHash := HashMD5File(ResumenFilename);
732-
AddLineToDebugLog('console','****************************');
733-
AddLineToDebugLog('console','Block undone: '+IntToStr(blocknumber)); //'Block undone: '
734-
AddLineToDebugLog('console','****************************');
735-
AddLineToDebugLog('events',TimeToStr(now)+'Block Undone: '+IntToStr(blocknumber));
732+
ToLog('console','****************************');
733+
ToLog('console','Block undone: '+IntToStr(blocknumber)); //'Block undone: '
734+
ToLog('console','****************************');
735+
ToLog('events',TimeToStr(now)+'Block Undone: '+IntToStr(blocknumber));
736736
U_DataPanel := true;
737737
BlockUndoneTime := UTCTime;
738738
End;

0 commit comments

Comments
 (0)