This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
ethereumj-core/src/main/java/org/ethereum/manager Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 33
33
import java .nio .file .Files ;
34
34
import java .nio .file .Path ;
35
35
import java .nio .file .Paths ;
36
- import java .text . DateFormat ;
37
- import java .text . SimpleDateFormat ;
36
+ import java .time . LocalDateTime ;
37
+ import java .time . format . DateTimeFormatter ;
38
38
import java .util .*;
39
39
import java .util .function .Function ;
40
40
@@ -56,7 +56,7 @@ public class BlockLoader {
56
56
57
57
Scanner scanner = null ;
58
58
59
- DateFormat df = new SimpleDateFormat ("HH:mm:ss.SSSS" );
59
+ DateTimeFormatter df = DateTimeFormatter . ofPattern ("HH:mm:ss.SSSS" );
60
60
61
61
private void blockWork (Block block ) {
62
62
if (block .getNumber () >= blockchain .getBlockStore ().getBestBlock ().getNumber () || blockchain .getBlockStore ().getBlockByHash (block .getHash ()) == null ) {
@@ -69,7 +69,7 @@ private void blockWork(Block block) {
69
69
ImportResult result = blockchain .tryToConnect (block );
70
70
71
71
if (block .getNumber () % 10 == 0 ) {
72
- System .out .println (df . format ( new Date () ) + " Imported block " + block .getShortDescr () + ": " + result + " (prework: "
72
+ System .out .println (LocalDateTime . now (). format ( df ) + " Imported block " + block .getShortDescr () + ": " + result + " (prework: "
73
73
+ exec1 .getQueue ().size () + ", work: " + exec2 .getQueue ().size () + ", blocks: " + exec1 .getOrderMap ().size () + ") in " +
74
74
(System .currentTimeMillis () - s ) + " ms" );
75
75
}
You can’t perform that action at this time.
0 commit comments