Removed unnecessary repository parameter from PruneManager.isBlockPruned()

This commit is contained in:
CalDescent 2021-10-07 18:51:52 +01:00
parent dff9ec0704
commit f6effbb6bb
2 changed files with 3 additions and 3 deletions

View File

@ -1384,7 +1384,7 @@ public class Controller extends Thread {
BlockData blockData = repository.getBlockRepository().fromSignature(signature); BlockData blockData = repository.getBlockRepository().fromSignature(signature);
if (blockData != null) { if (blockData != null) {
if (PruneManager.getInstance().isBlockPruned(blockData.getHeight(), repository)) { if (PruneManager.getInstance().isBlockPruned(blockData.getHeight())) {
// If this is a pruned block, we likely only have partial data, so best not to sent it // If this is a pruned block, we likely only have partial data, so best not to sent it
blockData = null; blockData = null;
} }
@ -1537,7 +1537,7 @@ public class Controller extends Thread {
} }
if (blockData != null) { if (blockData != null) {
if (PruneManager.getInstance().isBlockPruned(blockData.getHeight(), repository)) { if (PruneManager.getInstance().isBlockPruned(blockData.getHeight())) {
// If this request contains a pruned block, we likely only have partial data, so best not to sent anything // If this request contains a pruned block, we likely only have partial data, so best not to sent anything
// We always prune from the oldest first, so it's fine to just check the first block requested // We always prune from the oldest first, so it's fine to just check the first block requested
blockData = null; blockData = null;

View File

@ -136,7 +136,7 @@ public class PruneManager {
} }
} }
public boolean isBlockPruned(int height, Repository repository) throws DataException { public boolean isBlockPruned(int height) throws DataException {
if (!this.isTopOnly) { if (!this.isTopOnly) {
return false; return false;
} }