forked from Qortal/qortal
Removed unnecessary repository parameter from PruneManager.isBlockPruned()
This commit is contained in:
parent
dff9ec0704
commit
f6effbb6bb
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user