mirror of
https://github.com/Qortal/qortal.git
synced 2025-06-22 15:11:22 +00:00
Fixed NPE introduced in earlier commit.
This commit is contained in:
parent
c8466a2e7a
commit
22efaccd4a
@ -1415,11 +1415,13 @@ public class Controller extends Thread {
|
|||||||
|
|
||||||
BlockData blockData = repository.getBlockRepository().fromReference(parentSignature);
|
BlockData blockData = repository.getBlockRepository().fromReference(parentSignature);
|
||||||
|
|
||||||
|
if (blockData != null) {
|
||||||
if (PruneManager.getInstance().isBlockPruned(blockData.getHeight(), repository)) {
|
if (PruneManager.getInstance().isBlockPruned(blockData.getHeight(), repository)) {
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (blockData != null && blockSummaries.size() < numberRequested) {
|
while (blockData != null && blockSummaries.size() < numberRequested) {
|
||||||
BlockSummaryData blockSummary = new BlockSummaryData(blockData);
|
BlockSummaryData blockSummary = new BlockSummaryData(blockData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user