mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-22 20:26:50 +00:00
Removed unnecessary repository parameter from PruneManager.isBlockPruned()
This commit is contained in:
@@ -1384,7 +1384,7 @@ public class Controller extends Thread {
|
||||
BlockData blockData = repository.getBlockRepository().fromSignature(signature);
|
||||
|
||||
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
|
||||
blockData = null;
|
||||
}
|
||||
@@ -1537,7 +1537,7 @@ public class Controller extends Thread {
|
||||
}
|
||||
|
||||
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
|
||||
// We always prune from the oldest first, so it's fine to just check the first block requested
|
||||
blockData = null;
|
||||
|
@@ -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) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user