Skip to content

Commit

Permalink
refactor: add default ctor for DownloadProgressTracker
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering committed Nov 27, 2024
1 parent e8f52ee commit 8782e0c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ public class DownloadProgressTracker extends AbstractPeerDataEventListener {
public double preBlocksWeight = 0.05;
public double blocksWeight;

public DownloadProgressTracker() {
this(false);
}

public DownloadProgressTracker(boolean hasPreBlockProcessing) {
this.hasPreBlockProcessing = hasPreBlockProcessing;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static void main(String[] args) throws Exception {
chain.addWallet(wallet);
peerGroup.addWallet(wallet);

DownloadProgressTracker bListener = new DownloadProgressTracker(false) {
DownloadProgressTracker bListener = new DownloadProgressTracker() {
@Override
public void doneDownload() {
System.out.println("blockchain downloaded");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static void main(String[] args) throws Exception {
chain.addWallet(wallet);
peerGroup.addWallet(wallet);

DownloadProgressTracker bListener = new DownloadProgressTracker(false) {
DownloadProgressTracker bListener = new DownloadProgressTracker() {
@Override
public void doneDownload() {
System.out.println("blockchain downloaded");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static void main(String[] args) throws Exception {
chain.addWallet(wallet);
peerGroup.addWallet(wallet);

DownloadProgressTracker bListener = new DownloadProgressTracker(false) {
DownloadProgressTracker bListener = new DownloadProgressTracker() {
@Override
public void doneDownload() {
System.out.println("blockchain downloaded");
Expand Down

0 comments on commit 8782e0c

Please sign in to comment.